nleaves: Number of Leaves/Terminal Nodes

Description Usage Arguments Value

Description

Compute the number of leaves (i.e., the number of temrinal nodes) of a tree.

Usage

1
2
3
4
5
6
7
nleaves(object)

## S3 method for class 'rpart'
nleaves(object)

## S3 method for class 'BinaryTree'
nleaves(object)

Arguments

object

An object of class "rpart" or "BinaryTree".

Value

Returns TRUE if object does not contain any splits and FALSE otherwise.


bgreenwell/mertree documentation built on May 12, 2019, 8:19 p.m.