plotBar | R Documentation |
This function generates the bar plot of canonical loadings.
plotBar(data, loadings, qvalues, feature_groups = NULL, alpha = 0.05)
data |
Data matrix corresponding to the canonical loadings, samples are in rows, variables are in columns. |
loadings |
A named vector containing the estimated loadings. |
qvalues |
A vector containing qvalues for the canonical loadings. |
feature_groups |
A vector indicating the group information of variables. |
alpha |
Significance level, 0.05 by default. |
A bar plot of canonical loadings, colored by significance, if group is not NULL, background is colored by group.
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) pvalue <- CPTloading(X = covid$metabolite, Y = covid$protein, side = "X", K = 1, r = 10, penalty = "Fixed", rho_x = 0.9, rho_y = 0.9, permutation_no = 100) p_bar <- plotBar(data = covid$metabolite, loadings = out$u[,1], qvalues = pvalue, feature_groups = NULL, alpha = 0.1) p_bar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.