plot_pca: PCA analysis of data

Description Usage Arguments Details Value

View source: R/plot.R

Description

PCA analysis of data

Usage

1
2
3
4
5
6
7
8
plot_pca(
  data,
  group,
  center = TRUE,
  scale = FALSE,
  pic_title = "All-PCA",
  ellipse = FALSE
)

Arguments

data

A matrix representing the genomic data such as gene expression data, miRNA expression data.
For the matrix, the rows represent the genomic features, and the columns represent the samples.

group

A data frame contain two columns. The first column is sample name matched with colnames of data, The second column is the cluster label of samples.

center

a logical value indicating whether the variables should be shifted to be zero centered. Alternately, a vector of length equal the number of columns of x can be supplied. The value is passed to scale.

scale

a logical value indicating whether the variables should be scaled to have unit variance when use prcomp

pic_title

The title of plot.

ellipse

Whether add the confidence ellipse.

Details

Note that scale = TRUE cannot be used if there are zero or constant (for center = TRUE) variables.

Value

Return a 'ggplot' object contained a PCA plot.


Moonerss/ProteinBase documentation built on Dec. 17, 2021, 4:21 a.m.