Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/dist.subjects.R
Get distance matrix for subjects (observations) based on variables of mixed data types
1 | dist.subjects(data, weights, alwaysGower = FALSE)
|
data |
data frame |
weights |
optional vector of weights for variables in |
alwaysGower |
controls the way distances are calculated in case of exclusively continuous data; if |
Distances between subjects are based on Gower's general similarity coefficient with an extension of Podani for ordinal variables, see gowdis
. In the case that all variables are quantitative, either Euclidean distances or still Gower's distances can be used.
An object of class dist
Manuela Hummel
Gower J (1971). A general coefficient of similarity and some of its properties. Biometrics, 27:857-871.
Podani J (1999). Extending Gower's general coefficient of similarity to ordinal characters. Taxon, 48(2):331-340.
dendro.subjects
, similarity.subjects
, dist.variables
, mix.heatmap
1 2 3 4 5 6 7 | data(mixdata)
D <- dist.subjects(mixdata)
## example with weights
w <- rep(1:2, each=5)
D <- dist.subjects(mixdata, weights=w)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.