husson / FactoMineR

Package FactoMineR
42 stars 8 forks source link

Error in mortality.Rd and in plot.MFA #25

Open sheiden opened 9 months ago

sheiden commented 9 months ago

1) mortality.Rd

lines(res$freq$coord[1:9,1],mfa$freq$coord[1:9,2],col="red") lines(res$freq$coord[10:18,1],mfa$freq$coord[10:18,2],col="green")

should be:

lines(res$freq$coord[1:9,1],res$freq$coord[1:9,2],col="red") lines(res$freq$coord[10:18,1],res$freq$coord[10:18,2],col="green")

2) plot.MFA

But if the code is corrected, the first lines() statement produces an error:

> library(FactoMineR)
> data(mortality)
> res = MFA(mortality,group=c(9,9),type=c("f","f"), name.group=c("1979","2006"))
Messages d'avis :
1: ggrepel: 48 unlabeled data points (too many overlaps). Consider increasing max.overlaps 
2: ggrepel: 48 unlabeled data points (too many overlaps). Consider increasing max.overlaps 
> plot(res,choix="freq",invisible="ind",habillage="group")
> lines(res$freq$coord[1:9,1],res$freq$coord[1:9,2],col="red")
Erreur dans plot.xy(xy.coords(x, y), type = type, ...) : 
  plot.new has not been called yet