correlation-methods: Creation of an ExposomeCorr from an ExposomeSet.

Description Usage Arguments Value See Also Examples


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.





ExposomeSet which exposures will be used to calculate their correlation


Other arguments passed to cor, cramersV or to lm.


(default TRUE) If set to FALSE warnings will not be displayed.


ExposomeCorr with the correlation between the selected exposures and their description

See Also

plotCorrelation to plot the correlations of an ExposomeCorr, clustering to see how the exposures can cluster samples, pca to compute PCA on exposures


expo.c <- correlation(expo)
expo.c.table <- extract(expo.c)

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append,, basename, cbind, colnames,
    dirname,, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax,, pmin,, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Registered S3 method overwritten by 'pryr':
  method      from
  print.bytes Rcpp

Attaching package:rexposomeThe following object is masked frompackage:BiocGenerics:


Warning messages:
1: In chisq.test(...) : Chi-squared approximation may be incorrect
2: In chisq.test(...) : Chi-squared approximation may be incorrect
3: In chisq.test(...) : Chi-squared approximation may be incorrect
Object of class 'Exposome Correlation' (storageMode: environment)
 . assayData: 104 x 104 exposure-correlations
    . element names: corr 
    . exposures: ldde_lip, ..., home_pesticides 
 . featureData: 104 exposures 7 explanations
    . exposures: ldde_lip, ..., home_pesticides 
    . descriptions: Family, ..., .fct 

rexposome documentation built on March 13, 2021, 2:01 a.m.