title: Multiple Correspondence Analysis in R. Plotting supplementary categorical variables by using ggplot2
body: <p>I have recently used the following script in order to perform a MCA analysis and visualize the plot (I found it on <a href="http://gastonsanchez.com/blog/how-to/2012/10/13/MCA-in-R.html" rel="nofollow">http://gastonsanchez.com/blog/how-to/2012/10/13/MCA-in-R.html</a>). </p>
  
  <p>The data are from the Data frame "Tea" contained in the R package "FactoMineR". </p>
  
  <pre><code># load data tea
  data(tea)
  
  # select these columns
  newtea = tea[, c("Tea", "How", "how", "sugar", "where", "always")]
  
  # number of categories per variable
  cats = apply(newtea, 2, function(x) nlevels(as.factor(x)))
  
  # apply MCA
  mca1 = MCA(newtea, graph = FALSE)
  
  # data frame with variable coordinates
  mca1_vars_df = data.frame(mca1$var$coord, Variable = rep(names(cats), cats))
  
  # data frame with observation coordinates
  mca1_obs_df = data.frame(mca1$ind$coord)
  
  # plot of variable categories
  ggplot(data=mca1_vars_df, 
         aes(x = Dim.1, y = Dim.2, label = rownames(mca1_vars_df))) +
   geom_hline(yintercept = 0, colour = "gray70") +
   geom_vline(xintercept = 0, colour = "gray70") +
   geom_text(aes(colour=Variable)) +
   ggtitle("MCA plot of variables using R package FactoMineR")
  </code></pre>
  
  <p>It runs perfectly, but I would like to know how to introduce qualitative supplementary variables in the analysis. Since I'm not familiar with ggplot2 at all, I'm a bit lost here. </p>
  
  <p>For instance, if I wanted "Tea" to be the supplementary variable, how should I modify the script?</p>
  
  <pre><code>#apply MCA
  mca1 = MCA(newtea, graph = FALSE,quali.sup=1)
  </code></pre>
  
  <p>But how can I preserve this information in the ggplot script?</p>