Learn R Programming

rocTree (version 1.1.1)

print.rocTree: Printing an rocTree object

Description

The function prints an rocTree object. It is a method for the generic function print of class "rocTree".

Usage

# S3 method for rocTree
print(x, digits = 5, tree = NULL, ...)

Arguments

x

an rocTree object.

digits

the number of digits of numbers to print.

tree

an optional integer specifying the \(n^{th}\) tree in the forest to print. The function prints the contents of an rocForest object by default, if a tree is not specified.

...

for future development.

Examples

Run this code
# NOT RUN {
data(simDat)

## Fitting a pruned survival tree
rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = FALSE)

## Fitting a unpruned survival tree
rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = FALSE,
        control = list(numFold = 0))

# }
# NOT RUN {
## Fitting the ensemble algorithm (default)
rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = TRUE)
# }

Run the code above in your browser using DataLab