View source: R/predictors_functions.R
plot_corply | R Documentation |
Function creating plottig the correlation between 2 datasets, dat1 x dat2 on basis of (partial) correlations
plot_corply( res, main = NULL, zlim = NULL, reorder.x = FALSE, reorder.y = reorder.x, resort_on_p = FALSE, abs = FALSE, cor.abs = FALSE, reorder_dend = FALSE )
res |
associations obtained with cor.assoc |
main |
title of the plot |
zlim |
max association to plot |
reorder.x |
logical indicating if the function should reorder the x axis based on clustering |
reorder.y |
logical indicating if the function should reorder the y axis based on clustering |
resort_on_p |
logical indicating if the function should reorder x and y axis based on the pvalues of the associations |
abs |
logical indicating if the function should reorder based the absolute values |
cor.abs |
logical indicating if the function should reorder the plot base on the absolute values |
reorder_dend |
Tlogical indicating if the function should reorder the plot based on dendrogram |
heatmap with the results of cor.assoc
cor_assoc
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) #Plot the correlations plot_corply(cors, main="Correlations metabolites")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.