[R] contingency table

Carla Rebelo crebelo at liaad.up.pt
Thu Feb 14 11:31:22 CET 2008


Hello!

May you help me? I'm trying to do a contingency table using this

 > data(iris)
 > library(rpart)
 > modelo <- rpart(Species ~., iris)
 > prev <- predict(modelo, iris)

Finally the contingency table
 > table(iris$Species, prev)
But an error occurs:
Error in table(iris$Species, prev) :
  all arguments must have the same length

And I do not understand why, may you help me?

Thank You!



More information about the R-help mailing list