View source: R/micro_rtauargus.R
micro_rtauargus | R Documentation |
Development on micro_rtauargus()
is complete, and for new code we recommend
switching to the tabular-wise protection provided by tab_rtauargus()
or tab_multi_manager()
, which offer a lot more features for your
protection problems.
See more details in vignette("rtauargus")
or in
vignette("protect_multi_tables)
.
Protects tables built from microdata and specifications of the crossings.
The function allows to perform the complete process, namely the creation of
the asc and rda files, the construction of the arb file, the effective
launching of Tau-Argus and the eventual recovery of the results in R.
(Secrétise des tableaux construits à partir de microdonnées et des
spécifications des croisements. La fonction permet d'effectuer le processus
complet, à savoir la création des fichiers asc et rda, la construction
du fichier arb, le lancement effectif de Tau-Argus et la récupération
éventuelle des résultats dans R.)
The function executes sequentially the functions:
micro_asc_rda()
->
micro_arb()
->
run_arb()
Intermediate files without a name entered (asc_filename
...)
will be created in a temporary folder, with randomly generated names.
This mechanism allows the user to abstract from the preparation of
preparation of the data and to maintain the entire chain of
processing in R.
(La fonction exécute séquentiellement les fonctions :
micro_asc_rda()
->
micro_arb()
->
run_arb()
Les fichiers intermédiaires sans nom renseigné (asc_filename
...)
seront créés dans un dossier temporaire, avec des noms générés aléatoirement.
Ce mécanisme permet à l'utilisateur de s'abstraire de la préparation des
données propre à Tau-Argus et de maintenir l'intégralité de la chaîne de
traitements dans R.)
micro_rtauargus(microdata, explanatory_vars, safety_rules, suppress, ...)
microdata |
data.frame containing the microdata
(or path to text files already present: see section
Microdata already as text files). |
explanatory_vars |
categorical variables, in
form of a list of vectors. Each element of the list is a vector of
variable names forming a tab.
Example: |
safety_rules |
primary secret rule(s).
String in Tau-Argus batch syntax. The weighting is treated
in a separate parameter (do not specify WGT here, use the
|
suppress |
secret management method(s)
secondary (Tau-Argus batch syntax). If the method is the same for
each tabulation, the first parameter (table number) will be ignored and
renumbered automatically (see section 'Syntax'). |
... |
optional parameters for |
If import = TRUE
, a list of data.frames (protected tables),
NULL
otherwise.
(Si import = TRUE
, une liste de data.frames (tableaux
secrétisés), NULL
sinon.)
To use existing asc and rda files already existing, it is possible to
provide, instead of the data.frame, a character vector indicating
the path of these files. The first element of this vector is the asc file,
the second element the rda file. The rda file can be omitted if it has the
same name as the asc file (except for the extension).
Use this option to start the whole process without the generation
of the text data. Do not specify asc_filename
or
rda_filename
(used to name the text files to be created, which is
irrelevant here).
Pour utiliser des fichiers asc et rda existant déjà, il est possible de fournir à la place du data.frame un vecteur caractère indiquant le chemin de ces fichiers. Le premier élément de ce vecteur est le fichier asc, le deuxième élément le fichier rda. Le fichier rda peut être omis s'il porte le même nom que le fichier asc (à l'extension près).
Utiliser cette option pour lancer le processus complet sans la génération
des données en texte. Ne pas spécifier asc_filename
ou
rda_filename
(sert à nommer les fichiers texte à créer, ce qui est
sans objet ici).
Tau-Argus can handle multiple tabs for the same set of microdata. Passing a single value for an option will apply the same processing to each tab. For differentiated options, passing a vector containing as many values as there are tabs. If the lengths do not match (not recommended), a recycling is performed.
Unless otherwise stated, use the syntax mentioned in the documentation of Tau-Argus.
Special syntax for suppress
: the first parameter in the
Tau-Argus syntax is the tab number. If the method is identical
for all tabs, this first parameter will be ignored and the numbers
are automatically recalculated for the batch. In the writing
suppress = "GH(n,100)"
, n will thus be transformed into 1 for the
first tab, into 2 for the second tab, etc.
(Tau-Argus peut traiter plusieurs tabulations pour un même jeu de microdonnées. Passer une seule valeur pour une option appliquera le même traitement à chaque tabulation. Pour des options différenciées, passer un vecteur contenant autant de valeurs que de tabulations. Si les longueurs ne correspondent pas (déconseillé), un recyclage est effectué.
Sauf mention contraire, utiliser la syntaxe mentionnée dans la documentation de Tau-Argus.
Syntaxe spéciale pour suppress
: le premier paramètre dans la
syntaxe Tau-Argus est le numéro de la tabulation. Si la méthode est identique
pour toutes les tabulations, ce premier paramètre sera ignoré et les numéros
recalculés automatiquement pour le batch. Dans l'écriture
suppress = "GH(n,100)"
, n sera ainsi transformé en 1 pour la première
tabulation, en 2 pour la deuxième tabulation, etc.)
link{rtauargus_plus}
, a version optimized for a large
number of tables (at the cost of some usage restrictions).
(rtauargus_plus()
, une version optimisée pour un grand
nombre de tableaux (au prix de quelques restrictions d'usage).)
## Not run:
rtauargus(
microdata = data.frame(V1 = c("A", "A", "B", "C", "A"), V2 = "Z"),
explanatory_vars = c("V1", "V2"),
safety_rules = "FREQ(3,10)",
suppress = "GH(.,100)",
output_options = "AS+" # (example of optional parameter for micro_arb)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.