title: Multiple Factor Analysis (MFA) with R using FactoMineR
body: <p>I have encountered a problem with the MFA in FactoMineR. I am working with a data set containing physical, chemical and microbiological continuous variables measured in tomato plants, taken from 2 different treatments and at 3 time points. I have accommodated my data like this:</p>
  
  <pre><code>structure(list(row.names = structure(c(1L, 4L, 7L, 10L, 13L, 
  16L), .Label = c("GBA1", "GBA2", "GBA3", "GBB1", "GBB2", "GBB3", 
  "GBC1", "GBC2", "GBC3", "GBD1", "GBD2", "GBD3", "GBE1", "GBE2", 
  "GBE3", "RWA1", "RWA2", "RWA3", "RWB1", "RWB2", "RWB3", "RWC1", 
  "RWC2", "RWC3", "RWD1", "RWD2", "RWD3", "RWE1", "RWE2", "RWE3", 
  "RWF1", "RWF2", "RWF3", "RWG1", "RWG2", "RWG3", "RWH1", "RWH2", 
  "RWH3", "RWI1", "RWI2", "RWI3", "RWJ1", "RWJ2", "RWJ3"), class = "factor"), 
      Trt = structure(c(2L, 2L, 2L, 2L, 2L, 1L), .Label = c("Mineral", 
      "Organic"), class = "factor"), Status = structure(c(1L, 1L, 
      1L, 1L, 1L, 1L), .Label = c("H", "S"), class = "factor"), 
      Humidity = c(87.21704394, 80.29885961, 65.68047337, 85.9775641, 
      83.33333333, 85.98568282), pH = c(5.44, 5.94, 6.64, 6.19, 
      6.13, 5.45), Conductivity = c(837L, 867L, 752L, 871L, 699L, 
      406L), Nit.N = c(436.18, 433.92, 418.1, 458.78, 411.32, 167.24
      ), Ammonia.N = c(3.8122, 2.6452, 1.945, 1.7116, 2.4896, 7.16
      ), P = c(30.95, 15.2, 20.15, 16.1, 18.35, 48.2), K = c(135, 
      35, 95, 40, 145, 275), Ca = c(1287.5, 1427.5, 1610, 1570, 
      1640, 130), Mg = c(367.5, 575, 537.5, 532.5, 590, 42.5), 
      S = c(705L, 924L, 603L, 962L, 626L, 111L), Sodium = c(92.5, 
      170, 135, 127.5, 137.5, 35), Chlorides = c(15.1, 11.1, 15.4, 
      13.2, 13.8, 10.8), Fe = c(1.5, 2.2, 1.7, 2, 2.1, 3.1), Mn = c(1.1, 
      0.55, 0.7, 0.4, 0.65, 1.9), Rhizobium = c(0, 0, 0, 0, 0, 
      0), Total.bacteria = c(7207207.207, 5454545.455, 22727272.73, 
      18918918.92, 30630630.63, 64864864.86)), .Names = c("row.names", 
  "Trt", "Status", "Humidity", "pH", "Conductivity", "Nit.N", "Ammonia.N", 
  "P", "K", "Ca", "Mg", "S", "Sodium", "Chlorides", "Fe", "Mn", 
  "Rhizobium", "Total.bacteria"), row.names = c(NA, 6L), class = "data.frame")
  </code></pre>
  
  <p>I divided the variables in categorical (first 2), then the other 16 are continuous. However, I want to treat the 2 categorical variables separately. So I wrote the following code:</p>
  
  <pre><code>&gt;res &lt;- MFA(Oliver, group=c(1,1,3,11,2), type=c("n", "n","s", "s","s"),ncp=5,name.group=c("Sub","Stat", "Phys", "Chem", "Microbial")) 
  </code></pre>
  
  <p>However, it doesn't seem to work. Hence, I tried the following:</p>
  
  <pre><code>&gt;res=MFA(Oliver,group=c(2,16),type=c(rep("n",1),rep("s",1)),ncp=5,name.group=c("cat","cont")) 
  </code></pre>
  
  <p>and this other:</p>
  
  <pre><code>&gt;res=MFA(Oliver,group=c(2, 3, 11,2),type=c(rep("n",1),rep("s",3)), ncp=5,name.group=c("type","Phys", "Chem", "Microbial"))
  </code></pre>
  
  <p>But I kept having the same problem ("not convenient group definition"). Is there anything that I can do to keep the first 2 categorical groups separately? I would really appreciate your advice on how to properly run the model!</p>
  
  <p>Best wishes,</p>
  
  <p>Emma</p>