treedepth: Compute depth of a "party" tree

Description Usage Arguments Details Examples

View source: R/compilefits.R

Description

this function takes the output of the partykit::ctree function and prints the tree into a pdf file, located in the specified folder. It computes the depth and width and tries to create a pdf with the right dimensions.

Usage

1

Arguments

x

a tree

Details

recursive function

Examples

1
2
3
4
5
y=iris$Species;x=iris[,-5]
partyctree <- party::ctree(y ~ ., data=cbind(y=y,x))
treedepth(partyctree@tree)
partyctree <- party::ctree(y ~ ., data=cbind(y=y,x))
treedepth(partykit::ctree(y ~ ., data=cbind(y=y,x)))

DanielBonnery/BigSyn documentation built on June 28, 2020, 7:18 p.m.