pca_plot: PCA plot

View source: R/mt_extra_1.R

pca_plotR Documentation

PCA plot

Description

Plot PCA of a matrix or data frame with base R function.

Usage

pca_plot(x, y = NULL, scale = TRUE, ep.plot = FALSE, ...)

Arguments

x

a matrix for plotting. Should have row names

y

a factor or character vector specifying the group information of the row.

scale

a logical flag to indicate whether or not scale x.

ep.plot

plot ellipse or not.

...

further parameters passed to plot

Details

The rownames of x will be shown in the plot. y is used to indicate the group of row of x.

Value

a base R graphics object.

Author(s)

Wanchang Lin

Examples

data(iris)
pca_plot(iris[, 1:4], iris[, 5], ep.plot = TRUE)

wanchanglin/mtExtra documentation built on Aug. 2, 2024, 5:47 p.m.