Learn R Programming

MSbox (version 1.4.6)

viewPCA: fast PCA

Description

perform PCA from xcms object

Usage

viewPCA(
  dat,
  Group = NULL,
  centering = T,
  scaling = "none",
  x = 1,
  y = 2,
  size = 1.5,
  exclude = NULL,
  scale_group = NULL,
  scale_factor = 1,
  interactive = T,
  ...
)

Arguments

dat

sample ion intensity matrix, row sample, column feature.

Group

sample group information

centering

centering, default = TRUE

scaling

scaling method, default is scaling = "none". You can choose "auto" or "pareto"

x

PCA X axis, default is PC1

y

PCA Y axis, defult is PC2

size

dot size

exclude

exclude some classes of samples

scale_group

select groups needs to be scaled.

scale_factor

the scale factor, default = 1.

interactive

should interactive figure be plotted? default = TRUE. If you want to save the result in high resolution, use non interative plot.

...

other parameters

Author

Yonghui Dong

Examples

Run this code
dat <- matrix(runif(2*300), ncol = 2, nrow = 300)
Group <- rep_len(LETTERS[1:3], 300)
out <- viewPCA(dat, Group = Group)

Run the code above in your browser using DataLab