Learn R Programming

GDAtools (version 1.0)

textvarsup: Adds a categorical supplementary variable to a MCA graph

Description

Adds a categorical supplementary variable to a MCA graph of the cloud of the individuals.

Usage

textvarsup(resmca, var, sel = 1:nlevels(var), axes = c(1, 2), 
                  col = "black", app = 0, vname = NULL)

Arguments

See Also

plot.speMCA, plot.csMCA, plot.stMCA, plot.multiMCA, varsup

Examples

Run this code
## Performs a specific MCA on 'Music' example data set
## ignoring every 'NA' (i.e. 'not available') categories,
## plots the cloud of individuals,
## and then adds gender and age supplementary categories.
data(Music)
getindexcat(Music)
mca <- speMCA(Music[,1:5],excl=c(3,6,9,12,15))
plot(mca,type='i')
textvarsup(mca,Music$Gender,col='darkred')
textvarsup(mca,Music$Age,sel=c(1,3),col='orange',vname='age',app=1)

Run the code above in your browser using DataLab