I am new to R and am working on a data set including nominal, ordinal and metric data.
Therefore I am using the gower distance. In the next step I use this distance with hclust(x, method="complete")
to create clusters based on this distance.
Now I want to know how I can put different weights on variables in the gower distance. The documentation says:
daisy(x, metric = c("euclidean", "manhattan", "gower"), stand = FALSE, type = list(), weights = rep.int(1, p))
So there is a way, but I am unsure about the syntax (weights = ...
).
The documentation of weights
and rep.int
, did not help.
I also didn't find any other helpful explanation.
I would be very glad, if some one can help out.