Learn R Programming

randomUniformForest (version 1.1.0)

plotTree: Plot a Random Uniform Decision Tree

Description

plot the tree structure, showing nodes, variables, cut-points and predictions.

Usage

plotTree(treeStruct, 
rowNum = 1, 
height.increment = 1, 
maxDepth = 100, 
fullTree = FALSE, 
xlim = NULL, 
ylim= NULL, 
center = TRUE)

Arguments

Examples

Run this code
# not run
data(airquality)
ozone.ruf <- randomUniformForest(Ozone ~ ., data = airquality, 
ntree = 20, BreimanBounds = FALSE, threads = 1)

OneTree <- getTree.randomUniformForest(ozone.ruf, 10)

# plotTree(OneTree) ##only a part is visible

## full tree : 
# plotTree(OneTree, fullTree = TRUE, xlim = c(1,55), ylim = c(0, 11))

Run the code above in your browser using DataLab