rfactominer

Why the CA function in FactorMineR tells me that undefined columns are selected?


I'm using a dataframe named DataUniv composed of 13 variables. When I try to run a correspondance analysis using FactoMineR :

dataUniv.CA = CA(dataUniv[,2:7],
             col.sup=c(1,8:13))

It sends me back this error :

Error in `[.data.frame`(Xtot, , col.sup) : undefined columns selected

I don't really understand why it sent me back this type of error, as it seems that those columns are effectively defined, if I run :

View(dataUniv[,2:7])
View(dataUniv[,c(1,8:13)])

It returns something good...


Solution

  • I finally found it: the col.sup argument must contain columns that are included in the first argument.