plotPca: Principal component analysis

View source: R/plotting.R

plotPcaR Documentation

Principal component analysis

Description

Plot the two first principal components from a PCA.

Usage

plotPca(
  rotation,
  prop.vars,
  idx.x = 1,
  idx.y = 2,
  plot = "points",
  main = "PCA",
  cols = rep("black", nrow(rotation)),
  pchs = rep(20, nrow(rotation)),
  ...
)

Arguments

rotation

matrix of rotated data which columns corresponds to "principal components" (the first column will be plotted along the x-axis against the second column along the y-axis)

prop.vars

vector with the proportion of variance explained per PC

idx.x

index of the column from "rotation" that will be plotted along the x-axis

idx.y

index of the column from "rotation" that will be plotted along the y-axis

plot

use "points" to show a plot with points of PC1 versus PC2, and "text" to use text with row names of rotation as labels

main

main title of the plot

cols

N-vector of colors

pchs

N-vector of point symbols (used if plot="points")

...

arguments to be passed to plot, such as "xlim", ylim", etc

Value

nothing

Author(s)

Timothee Flutre

See Also

pca, orthoRotate2D


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.