Usage
bpCent3d(pc, clsAsgn, data.pts = TRUE, centroids = TRUE, choices = 1:3, scale = 1, pc.biplot = FALSE, var.axes = TRUE, col.score = "black", col.cntrs = "blue", col.load = "red", xlabs = NULL, ylabs = NULL, xlim = NULL, ylim = NULL, zlim = NULL, xlab = NULL, ylab = NULL, dim.lab = NULL, fov = 60)
Arguments
pc
The prcomp
object of the data used in clustering.
clsAsgn
A vector containing the cluster assignment for each record in
the clustering data.
data.pts
If TRUE
the point for each record is plotted.
centroids
If TRUE
the centroid for each cluster is plotted.
choices
length 2 vector specifying the components to plot.
scale
The variables scaled by lambda ^ scale
and the observations
are scaled by lambda ^ (1-scale)
, where lambda
are the eigen
values of the principal components solution. scale
should be between
0 and 1.
pc.biplot
If TRUE
, then lambda = 1
and the observations
are scaled up the sqrt(n) and the variables scaled down by sqrt(n). In this
case the inner product between variables approximate covariances, and the
distances between observations approximate Mahalanobis distance. Gabriel
refers to this as a "principal component biplot".
var.axes
If TRUE
the second set of points have arrows
representing them as (unscaled) axes.
col.score, col.cntrs, col.load
A vector of length 2 giving the colours for the first and
second set of points respectively (and the corresponding axes). If a
single colour is specified it will be used for both sets. If
missing the default colour is looked for in the
palette
: if there it and the next colour as used,
otherwise the first two colours of the paletter are used. xlabs
A vector of character strings to label the first set of
points: the default is to use the row dimname of x
, or
1:n
is the dimname is NULL
.
ylabs
A vector of character strings to label the second set of
points: the default is to use the row dimname of y
, or
1:n
is the dimname is NULL
.
xlim, ylim, zlim
Limits for the x, y, z axes in the units of the
first set of variables.
xlab, ylab, dim.lab, fov
Graphical parameters for rgl.