Description Usage Arguments Examples
View source: R/SUB_nD_applyRpart.R
Subroutine for applying classification trees using the rpart package
1 | applyRpart(formula, data, minsplit = 20)
|
formula |
a text string of the general structure "Response ~ Var1 + Var2". Converted to a formula inside the function |
data |
data frame for the response and predictor variables. predictor variables can be numeric or categorical, and can include missing values. |
minsplit |
smallest number of records for attempting a split. default is 20. |
1 2 3 | formula.use <- as.formula("Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width")
test.fit <- applyRpart(formula.use, data = iris,minsplit = 10)
summary(test.fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.