plot_pca: PCA scatter plot

Description Usage Arguments Value See Also Examples

View source: R/scatter.R

Description

Computes PCA using one of the methods provided in the Bioconductor package pcaMethods and plots the two first principal components CITATION: When using this function, cite the pcaMethods package

Usage

1
2
3
4
plot_pca(object, all_features = FALSE, center = TRUE, scale = "uv",
  color = group_col(object), shape = NULL, label = NULL,
  density = FALSE, title = "PCA", subtitle = NULL,
  color_scale = NULL, shape_scale = NULL, fill_scale = NULL, ...)

Arguments

object

a MetaboSet object

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before visualization.

center

logical, should the data be centered prior to PCA? (usually yes)

scale

scaling used, as in pcaMethods::prep. Default is "uv" for unit variance

color

character, name of the column used for coloring the points

shape

character, name of the column used for shape

label

character, name of the column used for point labels

density

logical, whether to include density plots to both axes

title, subtitle

the titles of the plot

color_scale

the color scale as returned by a ggplot function

shape_scale

the shape scale as returned by a ggplot function

fill_scale

the fill scale used for density curves

...

additional arguments passed to pcaMethods::pca

Value

a ggplot object. If density is TRUE, the plot will consist of multiple parts and is harder to modify.

See Also

pca

Examples

1
plot_pca(merged_sample, color = "Injection_order", shape = "Group")

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.