prednode: Predict Node from a Fitted rpart Object

Description Usage Arguments References See Also Examples

Description

Predict the node identification number from a fitted rpart object.

Usage

1
prednode(object, newdata)

Arguments

object

A fitted model object of class "rpart", the result of a call to the rpart function.

newdata

A data frame containing the values for which predictions will be made. The predictors referred to in the right side of formula(object) must be present by name in newdata.

References

This function is a modification of an approach suggested in a post [link] to the R-help mailing list on 22 July 2008 by Brian D. Ripley [link], Professor of Applied Statistics, University of Oxford, Oxford, UK.

See Also

rpart, predict.rpart

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

z.auto <- rpart(Mileage ~ Weight, car.test.frame)
prednode(z.auto, car.test.frame)

fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
prednode(fit, kyphosis)

## End(Not run)

JVAdams/artiFISHal documentation built on May 7, 2019, 10:14 a.m.