gettree {rseg}R Documentation

Extract tree model

Description

Extract a tree model from an object of class rseg.

Usage

gettree(x)

Arguments

x

an object of class rseg fit by cseg, eseg or rseg.

Details

Recursive segmentation by cseg, eseg or rseg fits models by iterative application of the functions ctree, evtree or rpart, respectively. Therefore, it is possible to extract a respective tree model from an object of class rseg.

Value

A tree model fit by the functions ctree, evtree or rpart.

Examples

airq <- subset(airquality, !is.na(Ozone))
airct <- cseg(Ozone ~ ., data = airq)
aircttree <- gettree(airct)
aircttree
plot(aircttree)

[Package rseg version 0.2.2 Index]