cor_assoc {MiMIR} | R Documentation |
Function to calulate the correlation between 2 matrices
cor_assoc(dat1, dat2, feat1, feat2, method = "pearson", quiet = FALSE)
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 |
correlations of the selected variables in the 2 martrices
plot_corply
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)