
PCA Plot
plot_pca.RdDraw a PCA scores plot. Currently supported data types:
glystats_pca_res: Result fromglystats::gly_pca().glyexp_experiment: Experiment created byglyexp::experiment(). PCA analysis is first performed usingglystats::gly_pca(), then the result is plotted.
Usage
plot_pca(x, type = "individual", groups = NULL, group_col = NULL, ...)
# S3 method for class 'glystats_pca_res'
plot_pca(x, type = "individual", groups = NULL, group_col = NULL, ...)
# S3 method for class 'glyexp_experiment'
plot_pca(
x,
type = "individual",
groups = NULL,
group_col = NULL,
stats_args = list(),
...
)Arguments
- x
An object to be plotted.
- type
The type of plot, one of "screeplot", "individual", "variables", or "biplot".
- groups
A factor or character vector specifying group membership for each sample. If provided, the plot will be colored by group. Only applicable to "individual" and "biplot" types. Passed to the
habillageparamter offactoextra::fviz_pca_ind()orfactoextra::fviz_pca_biplot().- group_col
A character string specifying where to find the group information.
- ...
Additional arguments passed to underlying factoextra functions:
type = "screeplot":
factoextra::fviz_screeplot().type = "individual":
factoextra::fviz_pca_ind().type = "variables":
factoextra::fviz_pca_var().type = "biplot":
factoextra::fviz_pca_biplot().
- stats_args
A list of keyword arguments to pass to
glystats::gly_pca().