ptable
The goal of the ptable package is to produce perturbation tables that can be used for applying noise to statistical tables with the cell-key method (CKM).
This package is developed within the SGA
Open source tools for perturbative confidentiality methods
.
The package contains the core-features to produce and check perturbation
tables (i.e. ptables) for frequency count and magnitude tables.
The ptables can be used for applying noise to statistical tables with
any cell-key method approach - among others either the cellKey()-package or TauArgus.
Feedback (via issues) with regards to bugs or features requests are very welcome as well as pull-requests.
With Release 1.0.0 we offer a first stable version which also will be available on CRAN.
With Release 0.4.0 we offer an additional modification of ptables for frequency count data in order to receive an higher level of protection
A stable version of the package can directly be installed from
CRAN
install.packages("ptable")
Newer versions of the package can be directly installed from github
using the devtools
package which must be installed on your
system
if (!require("devtools")) install.packages("devtools")
library(devtools)
# update all packages
update.packages(ask = FALSE)
# finally install the ptable package directly from github
::install_github(
devtools"sdcTools/ptable",
dependencies = c("Depends", "Imports"),
force = TRUE,
build_opts = "--build-vignettes"
)
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
hhtr
package:
::set_config(use_proxy(url = "xxx.xxx.xxx.xxx", port = yy)) httr
Alternatively you can download an archive (tar.gz) of the newest release here and install it manually using
install.packages('C:/Users/.../Downloads/v1.x.x.tar.gz', repos = NULL, type = 'source')
To load the package ptable
you have to call
library(ptable)
## help file
::ptable_pkg ?ptable
A detailed documentation is given in the vignette:
pt_vignette()
For first time users and visual learners there is a GUI. The unfinished dashboard can be started using the following command:
ptable()
The download buttons (for downloading the ptable and the graphics) only works within a browser.
The changelog is given here.
Starting from versions
> 0.3.2
and> 0.4.1
, functionscreate_ptable()
,create_cnt_ptable()
andcreate_num_ptable()
allow to create perturbation objects for count- and/or numeric variables in one step. The required inputs to these functions are the maximum noiseD=...
and the noise varianceV=...
.In versions
<= 0.3.2
, this process was separated into two parts:
- defining parameters using
pt_create_pParams()
- creating the final perturbation outputs using
pt_create_pTable()
These steps still work in newer versions of the package differently (if necessary):
- If the argument
create
increate_ptable()
,create_cnt_ptable()
orcreate_num_ptable()
is set toFALSE
, then these functions return an object of class [ptable_params-class].- This object can be used as input in
create_ptable()
only to create the final perturbation output.