treetopdf: Ctree to pdf graph

Description Usage Arguments 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
treetopdf(partykitctree, savepath)

Arguments

partykitctree:

an output of partykit::ctree

savepath:

a file path where to store the pdf of the plot

Examples

1
2
3
y=iris$Species;x=iris[,-5]
partykitctree <- partykit::ctree(y ~ ., data=cbind(y=y,x))
treetopdf(partykitctree,"./x.pdf")

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