plot_pca: Plot a PCA analisys into a biplot.

Description Usage Arguments

View source: R/pca.R

Description

Plot a PCA analisys into a biplot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_pca(
  pca_result,
  groups = NULL,
  alpha = 0.08,
  title = "",
  ellipse = TRUE,
  colours = c("green", "red"),
  labels = c("No", "Yes"),
  obs.scale = 1,
  var.scale = 1,
  varname.adjust = 1.5,
  varname.size = 3
)

Arguments

pca_result

PCA result to plot.

groups

optional factor variable indicating the groups that the observations belong to. If provided the points will be colored according to groups

alpha

alpha transparency value for the points (0 = transparent, 1 = opaque)

title

a title.

ellipse

draw a normal data ellipse for each group?

colours

groups colors.

labels

optional vector of labels for the observations

obs.scale

scale factor to apply to observations

var.scale

scale factor to apply to variables

varname.adjust

adjustment factor the placement of the variable names, >= 1 means farther from the arrow

varname.size

size of the text for variable names

scale

covariance biplot (scale = 1), form biplot (scale = 0). When scale = 1, the inner product between the variables approximates the covariance and the distance between the points approximates the Mahalanobis distance.


adrianmarino/commons documentation built on Dec. 18, 2021, 10:30 p.m.