Learn R Programming

simplextree (version 1.0.1)

clear: Clears the simplex tree

Description

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

Usage

clear(st)

Arguments

st

a simplex tree object.

Examples

Run this code
# NOT RUN {
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 >
# }

Run the code above in your browser using DataLab