# NOT RUN {
st <- simplextree::simplex_tree(1:3)
st %>% print_simplices()
# 1, 2, 3, 1 2, 1 3, 2 3, 1 2 3
st %>% collapse(list(1:2, 1:3))
# 1, 2, 3, 1 3, 2 3=
st %>% insert(list(1:3, 2:5))
st %>% print_simplices("column")
# 1 2 3 4 5 1 1 2 2 2 3 3 4 1 2 2 2 3 2
# 2 3 3 4 5 4 5 5 2 3 3 4 4 3
# 3 4 5 5 5 4
# 5
st %>% collapse(list(2:4, 2:5))
st %>% print_simplices("column")
# 1 2 3 4 5 1 1 2 2 2 3 3 4 1 2 2 3
# 2 3 3 4 5 4 5 5 2 3 4 4
# 3 5 5 5
# }
Run the code above in your browser using DataLab