textvarsup {GDAtools} | R Documentation |
Plot of a categorical supplementary variable
Description
Adds a categorical supplementary variable to a MCA cloud of categories.
Usage
textvarsup(resmca, var, sel = 1:nlevels(var), axes = c(1, 2),
col = "black", app = 0, vname = NULL)
Arguments
resmca |
object of class |
var |
the categorical supplementary variable. It does not need to have been used at the MCA step. |
sel |
numeric vector of indexes of the categories of the supplementary variable to be added to the plot (by default, labels are plotted for every categories) |
axes |
numeric vector of length 2, specifying the dimensions (axes) to plot (default is c(1,2)) |
col |
color for the labels of the categories (default is black) |
app |
numerical value. If 0 (default), only the labels are plotted and their size is constant; if 1, only the labels are plotted and their size is proportional to the weights of the categories; if 2, points (triangles) and labels are plotted, and points size is proportional to the weight of the categories. |
vname |
a character string to be used as a prefix for the labels of the categories (null by default) |
Author(s)
Nicolas Robette
See Also
supvar
, supvars
, plot.speMCA
, plot.csMCA
Examples
# specific MCA of Music example data set
data(Music)
junk <- c("FrenchPop.NA", "Rap.NA", "Rock.NA", "Jazz.NA", "Classical.NA")
mca <- speMCA(Music[,1:5], excl = junk)
# cloud of categories
# with Gender and Age supplementary variables
plot(mca, col = "gray")
textvarsup(mca, Music$Gender,col = "darkred")
textvarsup(mca, Music$Age, sel = c(1,3), col = "orange",
vname = "age", app = 1)