Provides functionality to generate, (interactively) modify (by adding, removing and renaming nodes) and convert nested hierarchies between different formats. These tree like structures can be used to define for example complex hierarchical tables used for statistical disclosure control.
R-Package to (interactively) generate or modify (nested) hierarchies that are required as input for packages such as sdcTable or cellKey.
The package is in its early stages and may change in future versions. Still, any feedback/pull requests are very much welcome!
The latest version from CRAN can be installed via
install.pacakges("sdcHierarchies")
The latest development-version can be installed directly via:
install.packages("remotes")
remotes::install_github(
repo = "bernhard-da/sdcHierarchies",
dependencies = TRUE,
build_opts = c("--no-resave-data", "--no-manual")
)
Please have a look at the package vignette sdcHierarchies::hier_vignette()
or by clicking here or browse the automatically generated documentation.
Updates/Changes are listed here.
hier_grid()
that returns all combinations of levels (and optionally levels) of some hierarchieshier_app()
in vignettehier_match()
returns a mapping between original and default codes, fixing hier_to_tree()
returns a hierarchy in default format for any object created for example with hier_convert()
, fixing data.tree
hier_display()
hier_xxx()
hier_import
h_min_contributing_codes()
sdcHier_info()
, the codes really contributing to a given node are computed and returnedsdcHier_convert()
allows to return a data.table
sdcHier_convert()
allows to return a list object suitable for sdcTable
(format = "sdc"
)sdcHier_import()
allows to create a hierarchy from a list-input created from sdcHier_convert(..., format = "sdc")
sdcHier_convert()
can now convert a hierarchy to the format tau-argus understands using format='argus'
sdcHier_export()
writes hierarchies in specific formats to disksdcHier_import()
gained the ability to return sdc hierarchies from hrc
-files in tau-argus format as well as from code and jsonsdcHier_info()
now shows the children of a node (if existing)sdcHier()
gained the feature to export hierarchies as json-encoded strings and hrc-files suitable as input for tau-argussdcHier_vignette()
sdcHier()
dynHier()
and fixedHier()
to sdcHier()
sdcHier_convert()
gained an argument path
to write the output to a filesdcHier_compute_fromList()
to create a hierarchy from a named listfull_names
froms sdcHier_compute()
dynHier()
and fixedHier()
dynHier()
and fixedHier()
dim_by_position()
to sdcHier_compute()
sdcHier_convert()
can output the required code to compute the hierarchysdcHier_convert()
can output the json-codedynHier()
and fixedHier()
sdcHier_create()
, sdcHier_add()
, sdcHier_delete()
, sdcHier_rename()
, sdcHier_info()
, sdcHier_nodenames()
and sdcHier_convert()
) dealing with creation and updating of nested hierarchies and extracting information have been added