[R] gower distance calculation
Tyler Smith
tyler.smith at mail.mcgill.ca
Mon Nov 20 04:47:15 CET 2006
Gavin Simpson wrote:
> vegdist in package vegan has Gower's distance, but all variables have to
> be numeric.
> If you want to use mixed data (numerics, factors, binary), see ?daisy in
> package cluster.
This is a little unclear. vegdist will handle regular quantitative
variables as well as binary variables. This is not so much a feature
of vegdist as of the Gower similarity, which treats binary and
quantitative variables identically, since a simple matching
coefficient produces the same similarity value as is produced by
Gower's quantitative similarity function for a variable that can take
only two values.
Perhaps that's what you meant, and I just misunderstood you. Perhaps
I'm wrong, and someone will correct me!
Cheers,
Tyler
More information about the R-help
mailing list