plot: plot methods for mixOmics

Description Usage Arguments Details Value Author(s) Examples

Description

Plot the explained variances from a pca object

Usage

1
2
3
## S3 method for class 'pca'
plot(x, ncomp = min(10, length(x$sdev)),
  type = "barplot", explained.var = TRUE, ...)

Arguments

x

a pca object obtained from pca function.

ncomp

number of PCs to show.

type

type of the plot, either "barplot" or argument passed to type in base plot.

explained.var

logical. Whether to show proportion of variance explained (TRUE) or the total variance (FALSE).

...

other arguments passed to plot.

Details

Creates a scree plot of explained variance by the study PCs.

Value

A scree plot of explained variance by the study PCs.

Author(s)

Florian Rohart, Kim-Anh Lê Cao, Ignacio González, Al J Abadi plotIndiv, pca and http://www.mixOmics.org for more details.

Examples

1
2
3
4
5
6
7
8
#' \dontrun{
## successful: TRUE
## final: TRUE

library(mixOmics.data)
pca.res <- pca(multidrug$ABC.trans, ncomp = 10, scale = TRUE)
plot(pca.res)
#' }

ajabadi/mixOmics2 documentation built on Aug. 9, 2019, 1:08 a.m.