Skip to content
Prev 387653 / 398502 Next

Colorizing different individuals with fviz

I understand that I came across this error after that


ind <- get_famd_ind(res.famd)
fviz_famd_ind(res.famd,
              col.ind = ifelse(ind>10,"red","black"),
              repel = TRUE)


Error in ifelse(ind > 10, "red", "black") :
  'list' object cannot be coerced to type 'double'
Calls: fviz_famd_ind -> %in% -> ifelse



I guess ind has (x,y) type and hence "ind>10" is not valid.

I also tried


col.ind = ifelse(ind.x>10,"red","black"),


But got the same error.

Any idea about that?



Regards,
Mahmood