Computes the correlation matrix in the various approaches of compositional and amount data analysis.
cor(x,y=NULL,…)
# S3 method for default
cor(x, y=NULL, use="everything",
method=c("pearson", "kendall", "spearman"),…)
# S3 method for acomp
cor(x,y=NULL,…,robust=getOption("robust"))
# S3 method for rcomp
cor(x,y=NULL,…,robust=getOption("robust"))
# S3 method for aplus
cor(x,y=NULL,…,robust=getOption("robust"))
# S3 method for rplus
cor(x,y=NULL,…,robust=getOption("robust"))
# S3 method for rmult
cor(x,y=NULL,…,robust=getOption("robust"))
a data set, eventually of amounts or compositions
a second data set, eventually of amounts or compositions
see cor
see cor
further arguments to cor
e.g. use
A description of a robust estimator. FALSE for the classical estimators. See mean.acomp for further details.
The correlation matrix.
The correlation matrix does not make much sense for compositions.
In R versions older than v2.0.0, cor
was defined
in package ``base'' instead of in ``stats''.
This might produce some misfunction.
# NOT RUN {
data(SimulatedAmounts)
meanCol(sa.lognormals)
cor(acomp(sa.lognormals5[,1:3]),acomp(sa.lognormals5[,4:5]))
cor(rcomp(sa.lognormals5[,1:3]),rcomp(sa.lognormals5[,4:5]))
cor(aplus(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))
cor(rplus(sa.lognormals5[,1:3]),rplus(sa.lognormals5[,4:5]))
cor(acomp(sa.lognormals5[,1:3]),aplus(sa.lognormals5[,4:5]))
# }
Run the code above in your browser using DataLab