plotScatter | R Documentation |
This function generates the scatter plot of canonical variates to check if there is separation pattern between groups.
plotScatter(X, Y, K, CCA_out, groups)
X |
Data matrix, each row is one sample, each column is one feature. |
Y |
Data matrix, each row is one sample, each column is one feature. |
K |
Number of pairs of canonical variates to be plotted. |
CCA_out |
List of SCCA results from PMA::CCA(). |
groups |
a vector indicating the group information of samples, will be colored differently in the scatter plot. |
A series of scatter plot with canonical variates as axes, samples from different groups are colored differently.
library(TestPMD) data("covid") out <- PMA::CCA(standsdmu(covid$metabolite), standsdmu(covid$protein), typex = "standard", typez="standard", penaltyx = 0.9, penaltyz = 0.9, K = 3, standardize = FALSE, trace = FALSE) p_list <- plotScatter(X = covid$metabolite, Y = covid$protein, CCA_out = out, groups = covid$meta$icu, K = 3) ggpubr::ggarrange(plotlist = p_list, nrow = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.