plot_biplot | R Documentation |
Generate biplot visualization based on the decomposed coefficient matrix C.
plot_biplot(
svd_obj,
component = list(x = 1, y = 2),
label = list(phenotype = NULL, variant = NULL),
n_labels = list(phenotype = 5, variant = 5),
color = list(phenotype = "orange", variant = "sky.blue"),
shape = list(phenotype = 20, variant = 4),
axis_label = list(main = "variant", sub = "phenotype"),
use_ggrepel = TRUE
)
svd_obj |
A named list containing three matrices with u, d, and v as their names as in the output from base::svd() function. One can pass the results of base::svd(t(fit$C)) or tsvd_of_C_with_names(fit) Please note that this function assumes svd_obj$u and svd_obj$v corresponds to phenotypes and variants, respectively. |
component |
A named list that specifies the index of the components used in the plot. |
label |
A named list that specifies the phenotype and variant labels. The labels needs to be the same order as in svd_obj$u and svd_obj$v. |
n_labels |
A named list that specifies the number of phenotype and variant labels in the plot. |
color |
A named list that specifies the color in the plot. |
shape |
A named list that specifies the color in the plot. |
axis_label |
A named list that specifies the names used in the axis labels. |
use_ggrepel |
A binary variable that specifies whether we should use ggrepel to annotate the labels of the data points. |
plot_biplot(svd(t(fit$C)), label=list('phenotype'=rownames(A_init), 'variant'=rownames(fit$C)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.