applyRpart: applyRpart

Description Usage Arguments Examples

View source: R/SUB_nD_applyRpart.R

Description

Subroutine for applying classification trees using the rpart package

Usage

1
applyRpart(formula, data, minsplit = 20)

Arguments

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.

Examples

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)

SOLV-Code/SPATFunctions-Package documentation built on April 25, 2020, 12:59 a.m.