Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'rcc':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
rep.space = "XY-variate",
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'pls':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
rep.space = "X-variate",
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'splsda':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
rep.space = "X-variate",
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'plsda':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
rep.space = "X-variate",
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'spls':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
rep.space = "X-variate",
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'pca':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
## S3 method for class 'spca':
plot3dIndiv(object, comp = 1:3, ind.names = FALSE,
xlab = NULL, ylab = NULL, zlab = NULL,
col = "blue", cex = 1, pch = "s", font = 1,
axes.box = "box", \ldots)
"rcc"
, "pls"
, "plsda"
,
"spls"
, "plsda"
or "pca"
.FALSE
for no names. If TRUE
, the row names of the first (or second)
data matrix is used as names (see Details)."X-variate"
,
"Y-variate"
or "XY-variate"
, determining the subspace to project the
individuals. Defaults to "XY-variate"
and "X-variate"
c("box",
"bbox",
"both")
.title3d
.plot3dIndiv
method makes scatter plot for individuals representation in three dimensions.
Each item corresponds to an individual.
If ind.names=TRUE
and row names is NULL
, then ind.names=1:n
, where
n
is the number of individuals.
The arguments col
, cex
, pch
and font
can be atomic vectors or vectors of
length n
. If atomic, this argument value determines the graphical attribute for all the individuals.
In the last case, multiple arguments values can be specified so that each item (individual)
can be given its own graphic attributes. Default values exist for this arguments.
Supported types for pch
are: "s"
for spheres, "t"
for tetrahedrons, "c"
for cubes,
"o"
for octahedrons, "i"
for icosahedrons and "d"
dodecahedrons.
The pointing device of your graphics user-interface can also be used to set the viewpoint interactively. With the pointing device the buttons are by default set as follows:
- left adjust viewpoint position
- middle adjust field of view angle
- right or wheel adjust zoom factorplotIndiv
, plot3dVar
, text3d
,
title3d
and rgl.postscript
to save the screen shot
to a file in PostScript or other vector graphics format.require(rgl)
## plot3d of individuals for objects of class 'rcc'
data(nutrimouse)
X <- nutrimouse$lipid
Y <- nutrimouse$gene
nutri.res <- rcc(X, Y, ncomp = 3, lambda1 = 0.064, lambda2 = 0.008)
col = nutrimouse$diet
font = c(rep(1, 20), rep(3, 20))
plot3dIndiv(nutri.res, ind.names = nutrimouse$diet,
axes.box = "box", font = font, col = col)
pch = c(rep("s", 20), rep("t", 20))
plot3dIndiv(nutri.res, ind.names = FALSE, axes.box = "both",
col = col, cex = 1.5, pch = pch)
## plot3d of individuals for objects of class 'pls' or 'spls'
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50),
keepY = c(10, 10, 10))
Time.Group = liver.toxicity$treatment[, "Time.Group"]
col <- rep(c("blue", "red", "darkgreen", "darkviolet"), rep(16, 4))
plot3dIndiv(toxicity.spls, ind.names = Time.Group,
col = col, cex = 0.8)
col <- rainbow(48)[Time.Group]
plot3dIndiv(toxicity.spls, ind.names = FALSE,
col = col, cex = 0.3, axes.box = "both")
## plot3d of individuals for objects of class 'pca'
data(multidrug)
pca.res <- pca(multidrug$ABC.trans, ncomp = 4, scale = TRUE)
palette(rainbow(9))
col = as.numeric(as.factor(multidrug$cell.line$Class))
plot3dIndiv(pca.res, cex = 0.25, col = col)
palette("default")
Run the code above in your browser using DataLab