cor.folder | R Documentation |
Computes the correlation matrices of the elements of an object of class folder
.
cor.folder(x, use = "everything", method = "pearson")
x |
an object of class |
use |
an optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (see |
method |
a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman": can be abbreviated. |
It uses cor
to compute the variance matrix of the numeric columns of each element of the folder. If some columns of the data frames are not numeric, there is a warning, and the variances are computed on the numeric columns only.
A list whose elements are the correlation matrices of the elements of the folder.
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
folder
to create an object is of class folder
.
mean.folder
, var.folder
, skewness.folder
, kurtosis.folder
for other statistics for folder
objects.
# First example: iris (Fisher)
data(iris)
iris.fold <- as.folder(iris, "Species")
iris.cor <- cor.folder(iris.fold)
print(iris.cor)
# Second example: roses
data(roses)
roses.fold <- as.folder(roses, "rose")
roses.cor <- cor.folder(roses.fold)
print(roses.cor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.