View source: R/kernel_functions.R
BrayCurtis | R Documentation |
Ruzicka and Bray-Curtis are kernel functions for absolute or relative frequencies and count data. Both kernels have as input a matrix or data.frame with dimension NxD and N>1, D>1, containing strictly non-negative real numbers. Samples should be in the rows. Thus, when working with relative frequencies, 'rowSums(X)' should be 1 (or 100, or another arbitrary number) for all rows (samples) of the dataset.
BrayCurtis(X)
Ruzicka(X)
X |
Matrix or data.frame that contains absolute or relative frequencies. |
For more info about these measures, please check Details in ?vegan::vegdist(). Note that, in the vegan help page, "Ruzicka" corresponds to "quantitative Jaccard". 'BrayCurtis(X)' gives the same result than '1-vegan::vegdist(X,method="bray")', and the same with 'Ruzicka(data)' and '1-vegan::vegdist(data,method="jaccard")'.
Kernel matrix (dimension: NxN).
data <- soil$abund
Kruz <- Ruzicka(data)
Kbray <- BrayCurtis(data)
Kruz[1:5,1:5]
Kbray[1:5,1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.