View source: R/similarity_coef.R
similarity_coef | R Documentation |
Calculates the similarity coeficient between observations based on their features (columns). Coefficient ranges between 0 and 1, with values close to 1 indicating more similarity.
similarity_coef(x, samp.names = NULL, digits = 3)
x |
A data frame of observations in rows and features (variables) in columns. Features must be non-zero and positive. |
samp.names |
A character vector with the names of the observations (samples) |
digits |
Number of digits to use |
A matrix of similarity coefficients
Borchardt, G.A. (1974). The SIMAN Coefficient for Similarity Analysis. Classification Society Bulletin, 3(2), 2–8.
dat = iris[c(1,2,51,52,101,102),] similarity_coef(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.