Skip to content
Learn Netverks
0

Variable projection with CA() {FactoMineR}

asked 8 hours ago by @qa-agagnzgckragjwlasexi 0 rep · 21 views

factominer

I am trying to project hundreds of sites, coloured by the factor GAB, to an AFC using this code :

afc=CA(df, quali.sup=1:5)
fviz_ca_row(afc,title="Projection des variables",col.sup=afc$GAB)

GAB being part of the quali.sup i added.

The following error appears :

Erreur dans UseMethod("droplevels") : 
  pas de méthode pour 'droplevels' applicable pour un objet de classe "c('integer', 'numeric')"

I tried turning my data frame into factor

df=lapply(df,factor)

but then i have this error

Erreur dans 1:nrow(X) : l'argument est de longueur nulle

I really don't understand what I am doing wrong
I have some rows that sum to 0 but I don't think that it's the issue because the AFC works when i don't try to add the quali.sup columns.

Thank you for your time

Comments on this question (0)

Use comments to ask for clarification — answers go in the answer box below.

Log in to comment on this question.

0 answers

Your answer