Plot a PCA object returned by prcomp
pcaplot(
pca,
components = 1:2,
group = NULL,
col = NULL,
pch = 19,
cex = 2,
legend = NULL,
...
)
If group is NULL, then NULL; else a data frame containing colors and shapes matching each group
PCA object returned by prcomp
a vector of length two indicating the components to plot
a factor determining shapes of the points to show (unless overriden by pch=...)
Color for plotting (default: internal palette)
Type of character to plot (default: 19)
size of the symbols used for plotting
draw a legend? If legend is a position (eg. "topright"), then a legend is drawn. If NULL or if the group parameter is NULL, then not.
any further parameters will be passed to the plot() function (e.g. col, cex, ...)
This is a simplistic function. A much better way is to use the pca2d function from the pca3d package.