rpart2gNEL: rpart to graphNEL Converter

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rpart2gNEL.R

Description

Creates an object of class graphNEL from one of class rpart.

Usage

1
rpart2gNEL(tr, remap=function(x) x, nsep="\n")

Arguments

tr

instance of rpart class from rpart package.

remap

function that maps node names in tree to node names in graph.

nsep

token that separates node name and vote tally in the rendering.

Details

Not explicitly used in the book, but the basis for a certain graph illustrating application of rpart. The newer coin/party packages have more interesting rendering approaches based on graphviz.

grabSplitV is a utility function for acquiring the variable names, remapAff will remap affymetrix probe names to gene symbols for use in the remap parameter.

Value

a graphNEL-class instance with nodes constructed to convey information on the data tree fit

Author(s)

Vince Carey <stvjc@channing.harvard.edu>

See Also

rpart, graphNEL-class

Examples

1
2
3
4
5
library(rpart)
example(rpart)
ff = rpart2gNEL(fit2)
ff
nodes(ff)

RbcBook1 documentation built on April 29, 2020, 5:38 a.m.