ggadd_supind.Rd
Adds supplementary individuals to a MCA cloud of the individuals
ggadd_supind(p, resmca, dfsup, axes = c(1,2),
col = "black", textsize = 5, pointsize = 2)
ggplot2
object with the cloud of variables
object of class MCA
, speMCA
, csMCA
, stMCA
or multiMCA
.
data frame with the supplementary individuals. It must have the same factors as the data frame used as input for the initial MCA.
numeric vector of length 2, specifying the dimensions (axes) to plot (default is c(1,2))
color for the labels and points of the individuals (default is black)
Size of the labels of the individuals. Default is 5.
Size of the points of the individuals. If NULL, only labels are plotted. Default is 2.
The function uses the row names of dfsup
as labels for the individuals.
# specific MCA of Music example data set
data(Music)
rownames(Music) <- paste0("i", 1:nrow(Music))
junk <- c("FrenchPop.NA", "Rap.NA", "Rock.NA", "Jazz.NA", "Classical.NA")
mca <- speMCA(Music[,1:5], excl = junk)
# adds individuals 1, 20 and 300 as supplementary individuals
# onto the cloud of individuals
p <- ggcloud_indiv(mca, col = "lightgrey")
ggadd_supind(p, mca, Music[c(1,20,300), 1:5])