Gower and partitioning around medoids
As you conduct clustering analysis in real life, one of the things that can quickly become apparent is the fact that neither hierarchical nor k-means are specifically designed to handle mixed datasets. By mixed data, I mean both quantitative and qualitative or, more specifically, nominal, ordinal, and interval/ratio data. The reality of most datasets that you will use is that they will probably contain mixed data. There are a number of ways to handle this, such as doing Principal Components Analysis (PCA) first in order to create latent variables, then using them as input in clustering or using different dissimilarity calculations. We will discuss PCA in the next chapter.
With the power and simplicity of R, I prefer to use the Gower dissimilarity coefficient to turn mixed data to the proper feature space. In R, you can even include factors as input variables to cluster. Additionally, instead of k-means, I recommend using the PAM clustering algorithm...