Hi all,
I'm aware that the problems with the ellipses have been discussed before in this group, but I haven't been able to find a solution to my particular problem, so here I go trying again. After performing a PCA to my data, I try to draw the ellipses around the results, and something weird happens. For the datasets where I have two supplementary qualitative variables (i.e. species and year), I get the graphic with the ellipses without any problem using the command "plotellipses(results)" (The graphic is attached for clarity). But, for the datasets which have only one qualitative variable (i.e. year), when trying the exact same command, I get the following error message (translated from Spanish, so it might not be exactly what R says in English, but you get the idea):
"Error in if (scale[1] > 0) r <- r/scale[1] :
missing value where TRUE/FALSE is needed"
I tried to draw the ellipses without using that command, like so:
"aa <- cbind.data.frame(mydata[,1],results$ind$coord)
bb <- coord.ellipse(aa,bary=TRUE)
plot.PCA(results, axes=c(1,2), choix="ind",habillage=1,ellipse=bb)"
But I got the exact same error message. The problem is, so to speak, in the second step. I can create a dataframe called aa with the results of the PCA and the qualitative variable (first column) without problems, but when I try the coord.ellipse command, there it goes the error message again.
Any ideas?
Thank you very much!
Virginia Morera.