Skip to content
Prev 177513 / 398503 Next

Question about rpart(sth~.,database)

I have a standard database - HouseVotes84 
For example:
       Class   V1 V2 V3   V4 V5 V6 V7 V8 V9 V10  V11 V12 V13 V14 V15  V16
1 republican    n  y  n    y  y  y  n  n  n   y <NA>   y   y   y   n    y
2 republican    n  y  n    y  y  y  n  n  n   n    n   y   y   y   n <NA>
3 democrat <NA>  y  y <NA>  y  y  n  n  n   n    y   n   y   y   n    n
     .
     .
     .
end I build a tree like this:
everything is ok! My question is:
What exactly mean "Class~.,"? 

Why when I use "Class~.," - then I get the best solution but when I use as a
parameter like this:
I also get solution but not such good like before.