cor_plot | R Documentation |
This function generates a correlation plot between two datasets, displaying correlation coefficients as a heatmap and significant correlations as scatter points.
cor_plot(
data1,
data2,
sig.name1 = "value1",
sig.name2 = "value2",
cutoff.pvalue = 0.05,
color = c("#62CCC9", "#FF9999")
)
data1 |
A data frame or matrix representing the first dataset. |
data2 |
A data frame or matrix representing the second dataset. |
sig.name1 |
A character string specifying the name of the first dataset (default: "value1"). |
sig.name2 |
A character string specifying the name of the second dataset (default: "value2"). |
cutoff.pvalue |
The significance threshold for correlation (default: 0.05). |
color |
A vector of two colors for the heatmap gradient (default: c("#62CCC9", "#FF9999")). |
The function computes correlation coefficients between corresponding columns in the two datasets and identifies significant correlations based on p-values.
A ggplot object displaying the correlation heatmap and scatter points.
# Read all data into memory
data(data.path, package = "iPRISM")
data(data.cell, package = "iPRISM")
# Draw the plot
cor_plot(data1 = data.path,data2 = data.cell,sig.name1 = "path",sig.name2 = "cell")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.