R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## allow backticks in rpart.matrix: see > ## https://stat.ethz.ch/pipermail/r-help/2012-May/314081.html > > library(rpart) > Iris <- iris > names(Iris) <- sub(".", " ", names(iris), fixed=TRUE) > rpart(Species ~ `Sepal Length`, data = Iris) n= 150 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 150 100 setosa (0.33333333 0.33333333 0.33333333) 2) Sepal Length< 5.45 52 7 setosa (0.86538462 0.11538462 0.01923077) * 3) Sepal Length>=5.45 98 49 virginica (0.05102041 0.44897959 0.50000000) 6) Sepal Length< 6.15 43 15 versicolor (0.11627907 0.65116279 0.23255814) * 7) Sepal Length>=6.15 55 16 virginica (0.00000000 0.29090909 0.70909091) * > > proc.time() user system elapsed 0.234 0.064 0.328