ggplotLoadings: plotLoadings

ggplotLoadingsR Documentation

plotLoadings

Description

Plots the two components defined by pc1, pc2 of the matrix of variable loadings coming from a multivariable analysis, typically a Principal Component Analysis (PCA). It can also plot the ellipses corresponding to each cluster defined by the associations matrix if not null. (in fact it is the main interest of this function).

Usage

ggplotLoadings(
  data,
  pc1 = 1,
  pc2 = 2,
  EV = NULL,
  associations = NULL,
  main = "Loadings",
  onlylabels = FALSE,
  highlabels = FALSE,
  gcontour = "ellipse"
)

Arguments

data

the matrix of variable loadings coming from a multivariable analysis, typically a Principal Component Analysis (PCA)

pc1

the fist component of the matrix of variable loadings to be plotted.

pc2

the second component of the matrix of variable loadings to be plotted.

EV

Eigenvalues vector

associations

the associations matrix that gives for each cluster (column 2) the corresponding buckets (column 1). See getClusters

main

Change the default plot title on the rigth corner

onlylabels

if TRUE, put only the association names without drawing the cluster contours. Implies that association matrix is provided.

highlabels

if TRUE, put the the association names in blue, and others in grey. Implies that association matrix is provided and fONLYLABELS equal to TRUE.

gcontour

type of contour; possible values are : 'ellipse', 'polygon', 'ellipse2', 'none'


INRA/Rnmr1D documentation built on April 11, 2024, 1:29 a.m.