Description Usage Arguments Value Examples
Plots two components of a PCA computed with do_pca
1 2 3 |
fit |
princomp object as returned by |
group |
Vector with the group to which each sample belongs.
The samples must be ordered as in |
sample_colors |
Named character vector of colors. The names of
the colors must be the classes in |
cp1 |
Integer, number of the component in the X-axis. Default is 1, the first component. |
cp2 |
Integer, number of the component in the Y-axis. Default is 2, the second component. |
legend |
Boolean, whether to plot a legend in the plot. Default is TRUE. |
legend_xy |
Situation of the legend in the plot. Available options are: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". |
cex |
Graphical parameter from |
pch |
Graphical parameter from |
mgp |
Graphical parameter from |
main |
Title of the graphics |
save_png |
Path to the file where the image as PNG will be saved. By default, the image is not saved. |
Plots two components of a PCA
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.