data(bryceveg) # returns a data frame of vegetation data
data(brycesite)
library(tree)
mod <- tree(factor(bryceveg$arcpat>0)~ elev+slope+av,data=brycesite)
pred <- predict(mod,newdata=brycesite)
confus(bryceveg$arcpat>0,pred)
Run the code above in your browser using DataLab