Error in Correspondence Analysis in R

263 views Asked by At

I used the function CA : CA(data[ ,2:5])

I got that graphic:

I have a contingency table with five columns: one qualitative data, and four quantitative data. But instead of the numbers I'd like to get the label of my first column. If I type CA(data[ ,1:5]) R anwers me that the first column is qualitative and not quantitative and there is a compilation error, so would you know how to display the label of the first column without getting an error?

1

There are 1 answers

0
Yorgos On

Set the rownames of your dataset to match the first column.

rownames(data) <- data[,1]
plot(ca(data[,2:5]))