View source: R/sp_tab_rtauargus.R
tab_rtauargus4 | R Documentation |
tab_rtauargus4(
tabular,
explanatory_vars,
dir_name,
secret_var,
totcode,
files_name = NULL,
hrc = NULL,
secret_no_pl = NULL,
cost_var = NULL,
value = "value",
freq = "freq",
ip = 10,
suppress = "MOD(1,5,1,0,0)",
safety_rules = paste0("MAN(", ip, ")"),
nb_tab_option = "smart",
limit = 14700L,
dfs_name = "tab",
...
)
tabular |
data.frame which contains the tabulated data and
an additional boolean variable that indicates the primary secret of type boolean |
explanatory_vars |
Vector of explanatory variables |
dir_name |
string indicated the path of the directory in which to save all the files (.rda, .hst, .txt, .arb, .csv) generated by the function. |
secret_var |
Nae of the boolean variable which specifies the secret, primary or not :
equal to "TRUE" if a cell is concerned by the secret,"FALSE" otherwise.
will be exported in the apriori file. |
totcode |
Code(s) which represent the total of a categorical variable
(see section 'Specific parameters' for this parameter's syntax).
If unspecified for a variable(neither by default nor explicitly)
it will be set to |
files_name |
string used to name all the files needed to process. All files will have the same name, only their extension will be different. |
hrc |
Informations of hierarchical variables (see section
'Hierarchical variables'). |
secret_no_pl |
name of a boolean variable which indicates the cells
on which the protection levels won't be applied. If |
cost_var |
Numeric variable allow to change the cost suppression of a cell
for secondary suppression, it's the value of the cell by default, can be
specified for each cell, fill with NA if the cost doesn't need to be changed
for all cells |
value |
Name of the column containing the value of the cells. |
freq |
Name of the column containing the cell frequency. |
ip |
Value of the safety margin in % (must be an integer). (Valeur pour les intervalles de protection en %, doit être entier ) |
suppress |
Algortihm for secondary suppression (Tau-Argus batch syntax), and the
parameters for it. |
safety_rules |
Rules for primary suppression with Argus syntax, if the primary suppression
has been dealt with an apriori file specify manual safety range :"MAN(10)"
for example. |
nb_tab_option |
strategy to follow for choosing variables automatically:
|
limit |
numeric, used to choose which variable to merge (if nb_tab_option = 'smart') and split table with a number of row above this limit in order to avoid tauargus failures |
dfs_name |
name used to write hrc files when reducing dims |
... |
additional parameters#' |
The original tabular is returned with additional variables indicating whether or not the cell has to be masked according to Tau-Argus
## Not run:
#Please don't forget to specify the localisation of Tau-Argus in your computer
options(
rtauargus.tauargus_exe =
"Y:/Logiciels/TauArgus/TauArgus4.2.3/TauArgus.exe"
)
data(datatest1)
expl_vars <- c("A10", "treff","type_distrib","cj")
res_dim4 <- tab_rtauargus4(
tabular = datatest1,
files_name = "datatest1",
dir_name = "tauargus_files",
explanatory_vars = expl_vars,
totcode = setNames(rep("Total", 4), expl_vars),
secret_var = "is_secret_prim",
value = "pizzas_tot_abs",
freq = "nb_obs_rnd",
verbose = TRUE,
nb_tab_option = "min",
verbose = TRUE
)
# With a data of 5 variables
data(datatest2)
expl_vars <- c("A10", "treff","type_distrib","cj","nuts1")
res_dim5 <- tab_rtauargus4(
tabular = datatest2,
files_name = "datatest2",
dir_name = "tauargus_files",
explanatory_vars = expl_vars,
totcode = setNames(rep("Total", 5), expl_vars),
secret_var = "is_secret_prim",
value = "pizzas_tot_abs",
freq = "nb_obs_rnd",
verbose = TRUE,
nb_tab_option = "min", # split into the minimum of tables.
verbose = TRUE,
suppress = "GH(1,100)" # We use hypercube to save time.
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.