cor_assoc function

cor_assoc

cor_assoc

Function to calulate the correlation between 2 matrices

cor_assoc(dat1, dat2, feat1, feat2, method = "pearson", quiet = FALSE)

Arguments

  • dat1: matrix 1
  • dat2: matrix 2
  • feat1: vector of strings with the names of the selected variables in dat
  • feat2: vector if strings with the names of the selected variables in dat2
  • method: indicates which methods of the correlation to use
  • quiet: logical to suppress the messages in the console

Returns

correlations of the selected variables in the 2 martrices

Examples

library(stats) #load the dataset m <- as.matrix(synthetic_metabolic_dataset) #Compute the pearson correlation of all the variables in the data.frame metabolic_measures cors<-cor_assoc(m, m, MiMIR::metabolites_subsets$MET63,MiMIR::metabolites_subsets$MET63)

See Also

plot_corply

  • Maintainer: Daniele Bizzarri
  • License: GPL-3
  • Last published: 2024-02-01

Useful links