clear: Clears the simplex tree

Description Usage Arguments Examples

View source: R/simplex_tree.R

Description

Removes all simplices from the simplex tree, except the root node.

Usage

1
clear(st)

Arguments

st

a simplex tree object.

Examples

1
2
3
4
5
st <- simplex_tree()
st %>% insert(1:3)
print(st) ## Simplex Tree with (3, 3, 1) (0, 1, 2)-simplices
st %>% clear()
print(st) ## < empty simplex tree >

simplextree documentation built on Sept. 13, 2020, 5:06 p.m.