As a follow up, I have this test file
,V1,V2,V3,V4
P1,73.6,0.7,74.6,3.1
P2,75.2,0.7,75.8,2.8
P3,6.5,0.0,7.3,2.5
P4,41.4,0.3,39.2,8.9
P4,5.4,0.1,18.2,1.1
P5,18.8,0.3,30.3,7.3
But, when I run the following commands, the HCPC gives me an error
> mydata <- read.csv(file = 'test.csv', header = TRUE)
> head(mydata)
X V1 V2 V3 V4
1 P1 73.6 0.7 74.6 3.1
2 P2 75.2 0.7 75.8 2.8
3 P3 6.5 0.0 7.3 2.5
4 P4 41.4 0.3 39.2 8.9
5 P4 5.4 0.1 18.2 1.1
6 P5 18.8 0.3 30.3 7.3
> library(FactoMineR)
> res.mca = MCA(mydata, ncp=2, quanti.sup=4, quali.sup=c(1:6), graph=FALSE)
Error in which(unlist(lapply(listModa, is.numeric))) :
argument to 'which' is not logical
I don't know if the quanti,sup and quali.sup are correct or there is a problem with the CSV file which I have/haven't to read the headers.
Any thought?