plot_corply function

plot_corply

plot_corply

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 )

Arguments

  • 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

Returns

heatmap with the results of cor.assoc

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) #Plot the correlations plot_corply(cors, main="Correlations metabolites")

See Also

cor_assoc

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

Useful links