tlist: An opinionated way to construct (tree-like) lists

Description Usage Details Examples

View source: R/tlist.R

Description

An opinionated way to construct (tree-like) lists

Usage

1

Details

________________________________________________________
(1)...........A..........B..............C...............
_____________[1]________[2]____________[3]______________
............/.|.\........|......../...|...|...\.........
(2)........A..B..C.......A.......A....B...C....D........
_____________[1]________[2]____________[3]______________
........../.\....|..../.|.|.\........|....|.../.|.\.....
(3)......A...B...A...A..B.C..D.......A....A..A..B..C....
_________[1]____[2]_____[3]_________[4]__[5]___[6]______
(...)

As seen in the graph above,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Instantiate a tlist to keep fruit data:
fruits <- tlist()
fruits$append("apple", 1, 1)
## Append a child
fruits$append("seed", 1, 3)
## Append siblings:
fruits$append(c("orange", "watermelon"), 1)
## Get the main list:
fruits$main()

## End(Not run)

strboul/mmy documentation built on Sept. 24, 2021, 12:08 p.m.