pcat | R Documentation |
This functions returns a result of prcomp object.
pcat(dat, x, y, scaling, cols, txt, tpos, ...)
dat |
dataframe, matrix or prcomp object |
x, y |
axis of pca score. 'x=1, y=2' means xaxis for PC1 score and yaxis for PC2 score |
scaling |
prcomp option, scaling or not. The default is "TRUE" |
cols |
A vector of manual colour |
txt |
A size of text(optional) |
tpos |
text position(optional) |
... |
Further plot arguments. E.g., pch |
return prcomp object
# minimum usage res <- pcat(iris[-5], scaling = TRUE, cols = c(1:3)[iris$Species]) res <- pcat(iris[-5], x =1, y = 3, scaling = TRUE, cols = c(1:3)[iris$Species], pch = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.