is.chain: Test if a tree is a chain

Description Usage Arguments Value Examples

View source: R/is.chain.R

Description

The function is.chain returns TRUE if x is a chain, FALSE otherwise.

Usage

1
2
3
4
is.chain(x)

## S3 method for class 'rtree'
is.chain(x)

Arguments

x

A tree to be tested.

Value

A logical.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## FALSE
is.chain(empty_tree())

## TRUE
(tr0 = c_("Bob", "Carl", "Daniel"))
is.chain(tr0)

## FALSE
(tr1 = r_(s = list(tr0)))
is.chain(tr1)

## FALSE
(tr = r_("titi", s = list(r_("toto"), r_("tata"))))
is.chain(tr)

oak documentation built on May 1, 2019, 9:13 p.m.