Learn R Programming

fdm2id (version 0.9.6)

cartnodes: Number of Nodes

Description

Return the number of nodes of a decision tree.

Usage

cartnodes(model)

Value

The number of nodes.

Arguments

model

The decision tree.

See Also

CART, cartdepth, cartinfo, cartleafs, cartplot

Examples

Run this code
require (datasets)
data (iris)
model = CART (iris [, -5], iris [, 5])
cartnodes (model)

Run the code above in your browser using DataLab