What does “argument to 'which' is not logical” mean in FactoMineR MCA?

前端 未结 4 518
后悔当初
后悔当初 2021-01-04 10:40

I\'m trying to run an MCA on a datatable using FactoMineR. It contains only 0/1 numerical columns, and its size is 200.000 * 20.

require(FactoMineR)
result &         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 10:52

    I just started to learn R yesterday, but the error comes from the fact that the MCA is for categorical data, so that's why your data cannot be numeric. Then to be more precise, before the MCA a "tableau disjonctif" (sorry i don't know the word in english : Complete disjunctive matrix) is created. So FactomineR is using this function :

    https://github.com/cran/FactoMineR/blob/master/R/tab.disjonctif.R

    Where i think it's looking for categorical values that can be matched to a numerical value (like Y = 1, N = 0).

    For others ; be careful : for R categorical data is related to factor type, so even if you have characters you could get this error.

提交回复
热议问题