pca.biplot3d: pca.biplot3d

Description Usage Arguments Examples

View source: R/pca.biplot3d.R

Description

An interactive 3D biplot. PC's are scaled to unit variance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pca.biplot3d(
  data,
  center = TRUE,
  scale = FALSE,
  pcx = 1,
  pcy = 2,
  pcz = 3,
  col = "black",
  groups = NULL,
  bg = "white",
  type = "sphere",
  r = 0.05,
  aspect3d = c(1, 1, 1),
  abbrev = FALSE,
  arrow.col = "black",
  label.col = "darkblue",
  label.cex = 1,
  simple.axis = FALSE,
  box = FALSE,
  grid = FALSE,
  ellipse = FALSE,
  ellipse.conf = 0.68,
  ellipse.alpha = 0.2,
  ellipse.shade = TRUE,
  ellipse.wire = FALSE,
  ...
)

Arguments

data

The data used to build the biplot

center

Column centering the data (default = TRUE). If center is TRUE then centering is done by subtracting the column means (omitting NA's) of x from their corresponding columns, and if center is FALSE, no centering is done.

scale

Scaling the data (default = FALSE). If scale is TRUE then scaling is done by dividing the (centered) columns of x by their standard deviations if center is TRUE, and the root mean square otherwise. If scale is FALSE, no scaling is done.

pcx

Which principal component to plot on the X-axis (default = 1)

pcy

Which principal component to plot on the Y-axis (default = 2)

pcz

Which principal component to plot on the Z-axis (default = 3)

col

Defines color of the observations, only if no group is defined

groups

A vector from which the unique values are used to color the observations

bg

Background color

type

Type of plot / Presentation of observations. Options: "sphere", "point", "text" (default = "sphere")

r

Vector or single value defining the sphere radius/radii

aspect3d

Vector used to set apparent ratios of the x, y, and z axes of the current bounding box

abbrev

Whether to abbreviate the variable names

arrow.col

Color of the variable arrow

label.col

Color of the variable label

label.cex

Size of the variable label

simple.axis

Uses axes3d instead of decorate3d if TRUE

box

Whether to draw a box (only if using decorate3d)

grid

Adds a reference grid if TRUE

ellipse

Whether to add confidence ellipses to groups (to display this on the plot, either ellipse.shade, ellipse.wire, or both must be TRUE)

ellipse.conf

Confidence limit for ellipses

ellipse.alpha

Alpha transparency value for the ellipse (0 = transparent, 1 = opaque)

ellipse.shade

Draws ellipse as a surface

ellipse.wire

Draws ellipse as line segments

...

Material properties (seematerial).

Examples

1
2
3
     data(iris)
     pca.biplot3d(iris[,-5], scale = T)
     pca.biplot3d(iris[,-5], groups = iris$Species, scale = T, box = T, grid = T, ellipse = T)

StefaanVerwimp/Biplot documentation built on Feb. 10, 2021, 9:37 a.m.