pca_plot | R Documentation |
Plot PCA of a matrix or data frame with base R function.
pca_plot(x, y = NULL, scale = TRUE, ep.plot = FALSE, ...)
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 |
ep.plot |
plot ellipse or not. |
... |
further parameters passed to |
The rownames
of x
will be shown in the plot. y
is used to indicate
the group of row of x
.
a base R graphics object.
Wanchang Lin
data(iris)
pca_plot(iris[, 1:4], iris[, 5], ep.plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.