KewKalustian / cellKey

cellKey is a R-package to create perturbed statistical (count) tables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cellKey

Travis build status Coverage status GitHub last commit GitHub code size in bytes

an R package for applying noise to statistical tables.

Information

This package is developed within the SGA Open source tools for perturbative confidentiality methods. This package is not optimized but already contains the core functionality to compute perturbed count- and magnitude tables with complex hierarchies.

We have a first rough version with which interested users may play around. Feedback (via issues) with regards to bugs or features requests are very welcome as well as pull-requests. One the package is deemed stable, a version will be released on CRAN too.

Important Note:

Major parts of the package were rewritten in version >=0.17 compared to previous versions. The following changes are now described:

  • Definition of hierarchies One main change is that it is now required to directly use functionality from sdcHierarchies to setup hierarchies when defining of tables. The following changes are possibly required in existing code.

    • replace ck_create_node() with hier_create()
    • replace ck_add_nodes() with hier_add()
    • replace ck_delete_nodes() with hier_delete()
    • replace ck_rename_nodes() with hier_rename()
  • Removing “abs”-input format For the sake of simplification, the differentiation between the “abs” and “destatis” format was removed in version >= 0.17. Internally, only the “destatis” format is used.

  • Simplification In order to simplify the application of the package, the process of defining, modifying and perturbing tables was modified. The implementation in versions >=0.17 is based on R6 classes and is described in detail in the new and package vignette that can be viewed after installation of the package using ck_vignette() or online.

  • Perturbation of magnitude tables This features was removed in versions 0.17.x and added again in versions >= 0.18.0. For examples please look at ?cellkey_pkg or at the vignette.

Installation

The package can directly be installed from github using the remotes package which is pulled in as a dependency from the devtools package. The following snippet installs the package:

# update your R installation
update.packages(ask = FALSE)

# install cellKey from github.com
if (!requireNamespace("remotes", quietly = TRUE)) {
  install.packages("remotes")
}
remotes::install_github(
  repo = "sdcTools/cellKey",
  dependencies = TRUE,
  build_opts = "--no-resave-data",
  force = TRUE)

If you experience a timeout due to a proxy server while downloading, one can work around this issue by specifying the proxy-server using the httr package:

httr::set_config(use_proxy(url = "xxx.xxx.xxx.xxx, port = yy))

Usage

An example on how to apply the package is provided in ?cellKey::cellkey_pkg where also all the available methods are described.

?cellKey::cellkey_pkg

The package vignette is currently work-in-progress. It can be looked at using cellKey::ck_vignette() or via the automatically deployed documentation by clicking here. The complete documentation is also updated automatically and can be viewed online.

Updates

Updates/Changes are listed here.

About

cellKey is a R-package to create perturbed statistical (count) tables


Languages

Language:R 100.0%