tests/testthat/test_issue8.R

context("issue #8")

tree <- hier_create(root = "Total", nodes = LETTERS[1:4])
tree <- hier_add(tree, root = "A", nodes = "a0")

code <- hier_convert(tree, as = "code")

tree_imported <- hier_import(inp = code, from = "code")

tree <- .sort(tree)
tree_imported <- .sort(tree_imported)

expect_true(inherits(tree_imported, "sdc_hierarchy"))
expect_identical(tree_imported, tree)

Try the sdcHierarchies package in your browser

Any scripts or data that you put into this service are public.

sdcHierarchies documentation built on Aug. 11, 2023, 1:07 a.m.