correlation | R Documentation |
Method to calculate the correlation between the exposures of an ExposomeSet. The correlation method takes into account the nature of each pair of exposures: continuous vs. continuous uses cor function from R base, categorical vs. categorical uses cramerV function from lsr R package and categorical vs. continuous exposures correlation is calculated as the square root of the adjusted r-square obtained from fitting a lineal model with the categorical exposures as dependent variable and the continuous exposure as independent variable. The function creates and returns an ExposomeCorr object.
correlation(object, ..., warnings = TRUE)
object |
|
... |
Other arguments passed to cor, cramersV or to lm. |
warnings |
(default |
ExposomeCorr
with the correlation between the selected
exposures and their description
plotCorrelation to plot the correlations of an ExposomeCorr, clustering to see how the exposures can cluster samples, pca to compute PCA on exposures
data("exposome") expo.c <- correlation(expo) expo.c expo.c.table <- extract(expo.c)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.