Learn R Programming

randPedPCA (version 1.0.1)

plot3D: 3D plot using rgl

Description

A simple wrapper around rgl's pot3d function.

Usage

plot3D(x, dims = c(1, 2, 3), xlab = NULL, ylab = NULL, zlab = NULL, ...)

Value

No return value, called for its side effects.

Arguments

x,

an rppca object

dims,

vector of length 3 - indices of the PCs to plot

xlab

(optional) x axis label

ylab

(optional) yaxis label

zlab

(optional) xz axis label

...

additional arguments passed to rgl::plot3d

Details

Note, different to plot.rppca, which is relatively slow, plot3D does not down-sample the principal components and it ignores the ds slot of an rppca object if present.

Examples

Run this code
pc <- rppca(pedLInv)
plot3D(pc)

ped <- pedigree(sire=pedMeta$fid, dam=pedMeta$mid, label=pedMeta$id)
pc2 <- rppca(ped)
plot3D(pc2)

Run the code above in your browser using DataLab