Learn R Programming

MiMIR (version 1.5)

plot_corply: plot_corply

Description

Function creating plottig the correlation between 2 datasets, dat1 x dat2 on basis of (partial) correlations

Usage

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
)

Value

heatmap with the results of cor.assoc

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

See Also

cor_assoc

Examples

Run this code
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")

Run the code above in your browser using DataLab