Description Usage Arguments Value Examples
Function to create an arbitrary hierarchy, primarily for the purposes of creating data for tests.
1 2 3 4 |
max_level |
integer, the level at which to stop. Note that the root is level 0. |
iter_level |
integer, optional, the level of the parents whose children are being generated on this iteration. This is primarily intended to be used internally, as this function uses recursion to generate the nodes. |
num_children_range |
integer vector, the min and max of this vector is used to determine the possible numbers of children that each parent can have. Integers within this range will be sampled in order to generate the children. |
child_opts |
integer vector of any length, optional. If supplied,
this supercedes |
parent_paths |
character, optional, the path(s) of the parents. Primarily used internally. |
name_mode |
character, can be any of 'ALTERNATE', 'alternate', 'LETTERS', 'letters', or 'numerals'. Both varieties of Alternate will result in names that alternate between using letters and using numerals, where ALTERNATE uses capitals and alternate uses lower case. |
force_full_tree |
logical, should the tree be forced to be full (all leaf nodes at the maximum level)? |
character, pathStrings for use in a data.tree structure
1 2 | # Make a full binary tree
.Make_Arbitrary_Hierarchy(max_level = 3L, child_opts = 2L, parent_paths = '0', name_mode = 'ALTERNATE', force_full_tree = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.