Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ URL: https://inseefrlab.github.io/rtauargus,
BugReports: https://github.com/inseefrlab/rtauargus/issues
Roxygen: list(markdown = TRUE)
StagedInstall: no
Config/roxygen2/version: 8.1.0
Config/roxygen2/version: 8.1.1
261 changes: 153 additions & 108 deletions NEWS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion R/analyse_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' creating a structured output for further processing.
#'
#' @param df_metadata A dataframe containing metadata in wide format.
#' @param df_eq_indicator A datadframe containing the indicators equations if needed.
#' @param df_eq_indicator A dataframe containing the indicators equations if needed.
#' @param verbose Logical. If `TRUE`, returns a detailed list of intermediate results
#' from each processing step. If `FALSE`, returns only the cluster assignments. Defaults to `FALSE`.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/hrc.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#' (nom et emplacement du fichier hrc produit. Si non renseigné, un fichier temporaire.)
#' @param fill_na fill in any missing values, using an other variable :
#' \itemize{
#' \item{`"up"` (default) : hierarchical variable of the level level
#' \item{`"up"` (default) : hierarchical variable of the level
#' immediately above}
#' \item{`"down"` : hierarchical variable of the level immediately
#' lower}
Expand Down
6 changes: 3 additions & 3 deletions R/micro_arb.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ apriori_batch <- function(ntab, hst_names, sep = ',', ignore_err = 0 , exp_triv
#' protection problems.
#'
#' See more details in `vignette("rtauargus")` or in
#' `vignette("protect_multi_tables)`.
#' `vignette("protect_multi_tables")`.
#'
#' Creates a batch file for microdata, executable by Tau-Argus in
#' command line. \cr
Expand Down Expand Up @@ -196,7 +196,7 @@ apriori_batch <- function(ntab, hst_names, sep = ',', ignore_err = 0 , exp_triv
#' @section Table identifiers:
#' If the list `explanatory_vars` has names, these will be
#' used in the batch to give an identifier to the table, in the form of
#' of a comment line (`// <TABLE_ID> "..."`). They will be
#' a comment line (`// <TABLE_ID> "..."`). They will be
#' reused by the `import` function to name the R format arrays
#' tables in output.
#'
Expand Down Expand Up @@ -289,7 +289,7 @@ apriori_batch <- function(ntab, hst_names, sep = ',', ignore_err = 0 , exp_triv
#' renuméroté automatiquement (voir la section 'Syntax').)
#' @param linked to process the secondary secret jointly on all
#' tabs. Only one delete command is allowed in this case (applied to all
#' all tables). \cr
#' tables). \cr
#' (pour traiter le secret secondaire conjointement sur toutes les
#' tabulations. Une seule commande suppress autorisée dans ce cas (appliquée à
#' tous les tableaux).)
Expand Down
18 changes: 9 additions & 9 deletions R/micro_asc_rda.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ write_rda <- function(info_vars) {
#' protection problems.
#'
#' See more details in `vignette("rtauargus")` or in
#' `vignette("protect_multi_tables)`.
#' `vignette("protect_multi_tables")`.
#'
#' Creates a fixed length text file (asc) and a metadata file
#' (rda) from microdata and additional information. \cr
Expand All @@ -89,11 +89,11 @@ write_rda <- function(info_vars) {
#' @param holding_var nom de la variable de holding.
#' (name of the holding variable.) \cr
#' @param decimals minimum number of decimals to display (see section 'Number of
#' of decimals').
#' decimals').
#' (nombre minimal de décimales à afficher (voir section 'Number of
#' of decimals').)
#' @param hrc information about the hierarchical variables (see section
#' section 'Hierarchical variables'). \cr
#' 'Hierarchical variables'). \cr
#' (informations sur les variables hiérarchiques (voir section
#' 'Hierarchical variables').)
#' @param hierleadstring character which, repeated n times, indicates that the value is
Expand All @@ -120,8 +120,8 @@ write_rda <- function(info_vars) {
#'
#' @return
#' Returns the names of the asc and rda files as a list (invisibly).
#' invisibly). Empty columns (filled with `NA` or empty strings) are not
#' strings) will not be exported to the asc file. A
#' Empty columns (filled with `NA` or empty strings) will not be
#' exported to the asc file. A
#' warning message will list the affected columns. \cr
#' (Renvoie les noms des fichiers asc et rda sous forme de liste (de
#' manière invisible). Les colonnes vides (remplies de `NA` ou de chaînes
Expand All @@ -136,7 +136,7 @@ write_rda <- function(info_vars) {
#'
#' The names of the elements of the vector give the variable concerned, the elements
#' of the vector give the value of the parameter for Tau-Argus. An unnamed element
#' element will be the default value, which will be assigned to all
#' will be the default value, which will be assigned to all
#' variables that can take this parameter.
#'
#' For example :
Expand Down Expand Up @@ -173,7 +173,7 @@ write_rda <- function(info_vars) {
#' hierarchical variables.
#'
#' To define a hierarchy based on the positions of characters
#' (**hierierlevels**), pass a sequence of integers separated by
#' (**hierlevels**), pass a sequence of integers separated by
#' spaces.
#'
#' *Example :* `c(CODECOM = "2 3 0 0 0")`
Expand All @@ -182,7 +182,7 @@ write_rda <- function(info_vars) {
#' (**hiercodelist**), the function expects the location of this file (and
#' a possible `hiercodelist` if it differs from the default option of the
#' package). In this case, you can write explicitly the path to an existing file
#' file (`c(A38 = "a38.hrc")`), but also make a call to
#' (`c(A38 = "a38.hrc")`), but also make a call to
#' `write_hrc()` which will generate an hrc file from microdata.
#'
#' *Example :* `c(A38 = write_hrc(microdata, c("A38", "A21", "A10")))`
Expand Down Expand Up @@ -238,7 +238,7 @@ write_rda <- function(info_vars) {
#'
#' @section Number of decimals:
#'
#' The parameter `decimals` indicates the minimum number of decimals to be
#' The parameter `decimals` indicates the minimum number of decimals to
#' appear in the output file (whatever the number of decimals
#' actually present in `microdata`). It applies to all
#' real variables (double) but not to integer variables (integer). For
Expand Down
6 changes: 3 additions & 3 deletions R/micro_rtauargus.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' protection problems.
#'
#' See more details in `vignette("rtauargus")` or in
#' `vignette("protect_multi_tables)`.
#' `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
Expand All @@ -32,7 +32,7 @@
#' 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
#' the data and to maintain the entire chain of
#' processing in R. \cr
#'
#' (La fonction exécute séquentiellement les fonctions : \itemize{
Expand Down Expand Up @@ -64,7 +64,7 @@
#' @inheritSection micro_arb Syntax
#'
#' @section Microdata already as text files:
#' To use existing asc and rda files already existing, it is possible to
#' To use existing asc and rda files, 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
Expand Down
2 changes: 1 addition & 1 deletion R/multitable.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ journal_add_line <- function(journal,...){
#' @inheritParams tab_rtauargus
#' @param list_tables named list of `data.frame` or `data.table` representing the tables to protect
#' @param list_explanatory_vars named list of character vectors of explanatory
#' variables of each table mentionned in list_tables. Names of the list are the same as of the list of tables.
#' variables of each table mentioned in list_tables. Names of the list are the same as of the list of tables.
#' @param alt_hrc named list for alternative hierarchies (useful for non nested-hierarchies)
#' @param alt_totcode named list for alternative codes
#' @param ip_start integer: Interval protection level to apply at first treatment of each table
Expand Down
2 changes: 1 addition & 1 deletion R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ df_op.rtauargus <- function(html = FALSE) {
#' user.*
#'
#' On loading the package, all the rtauargus options, that are not already
#' been set by the user, are set with their default values (see table below).
#' set by the user, are set with their default values (see table below).
#' The already defined options keep the values set by the user.
#'
#' The options can be set during a session with the following instruction
Expand Down
8 changes: 4 additions & 4 deletions R/rtauargus_plus.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
#'
#' In interactive mode, Tau-Argus can process up to 10 tabs
#' simultaneously for the same microdata set. In batch mode, a larger number of
#' of crossings can be specified. However, doing so
#' crossings can be specified. However, doing so
#' can be particularly time consuming, as Tau-Argus takes a lot of time
#' to read large text files of microdata.
#'
#' `rtauargus_plus` helps to improve the speed of execution. The function
#' splits the list of tabs into groups of size `grp_size` and
#' makes a call to `micro_rtauargus()` for each group. It writes an
#' asc file restricted to the only variables actually used within a
#' of a group.
#' group.
#'
#' The results are then aggregated into a single list, as if Tau-Argus
#' had been called only once.
#'
#' Modifying `grp_size` will not change the result, only the time
#' execution time. A value around 5 (default) seems to be a good compromise
#' between reading too large asc files and calling Tau-Argus too often.
#' Tau-Argus too much. It can be adjusted according to the number of
#' It can be adjusted according to the number of
#' common variables within each tab group.
#
#' (En mode interactif, Tau-Argus peut traiter jusqu'à 10 tabulations
Expand Down Expand Up @@ -52,7 +52,7 @@
#'
#' In return for the speed of execution, the crossings must have the
#' same characteristics (same primary secret rules, same secondary secret method,
#' same secondary secret, same weighting variable, etc.). The parameters
#' same weighting variable, etc.). The parameters
#' `safety_rules`, `supress`, ..., must therefore contain a
#' unique value.
#'
Expand Down
4 changes: 2 additions & 2 deletions R/run_arb.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ unquote <- function(s) sub("^[\"'](.+)[\"']$", "\\1", s)
#' therefore requires the software to be accessible from the workstation.
#'
#' The location of the TauArgus.exe program is defined globally when the
#' loading the package. In fact, the argument `tauargus_exe` will not
#' loading the package. In fact, the argument `tauargus_exe` will
#' normally not have to be specified (except to override the global option the
#' time of the execution of the function).
#'
#' Checks are made before the actual launching of Tau-Argus:
#' existence of the software on the computer, of the asc and rda files, of the folders where
#' write the results, the variables to be used (crossings, response variable) in the
#' response variable) in the metadata (rda file). \cr
#' metadata (rda file). \cr
#'
#' (Seul l’argument `arb_filename` est obligatoire, car toutes les
#' informations nécessaires sont présentes dans ce fichier.
Expand Down
10 changes: 5 additions & 5 deletions R/tab_arb.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tab_apriori_batch <- function(hst_names, sep, ignore_err = 0 , exp_triv = 0) {
#'
#' @section Syntaxe:
#'
#' For tabular data, this function secures only one table at a time#'
#' For tabular data, this function secures only one table at a time.
#' Unless specific details, use syntax from Tau-Argus manual \cr
#' Sauf mention contraire, utiliser la syntaxe mentionnée dans la documentation
#' de Tau-Argus.
Expand Down Expand Up @@ -149,7 +149,7 @@ tab_apriori_batch <- function(hst_names, sep, ignore_err = 0 , exp_triv = 0) {
#' Chaîne de caractères en syntaxe batch Tau-Argus. Si le secret primaire
#' a été traité dans un fichier d'apriori : utiliser "MAN(10)")
#' @param suppress
#' Algortihm for secondary suppression (Tau-Argus batch syntax), and the
#' Algorithm for secondary suppression (Tau-Argus batch syntax), and the
#' parameters for it.\cr
#' ( Algorithme de gestion du secret secondaire
#' (syntaxe batch de Tau-Argus), ainsi que les potentiels paramètres associés)
Expand All @@ -161,18 +161,18 @@ tab_apriori_batch <- function(hst_names, sep, ignore_err = 0 , exp_triv = 0) {
#' (Format des fichiers en sortie (codification Tau-Argus).
#' Valeur par défaut du package : `"2"` (csv for pivot-table).
#' Pour le format SBS utiliser `"4"`)
#' @param output_options Additionnal parameter for the output,
#' @param output_options Additional parameter for the output,
#' by default : \code{"AS+"} (print Status). To specify no options : `""`.\cr
#' (Options supplémentaires des fichiers en sortie. Valeur
#' par défaut du package : `"AS+"` (affichage du statut). Pour ne
#' spécifier aucune option, `""`.)
#' @param gointeractive Boolean, if TRUE will open a Tau-Argus window and launch
#' the batch in it (`FALSE` by default). \cr
#' (Possibilité de lancer le batch depuis le menu de Tau-Argus
#' (`FALSE` par défaut).)
#' (`FALSE` par défaut).
#'
#' @return A list containing two elements :
#' the arb file name and the output name (usefull if the name is generated randomly) \cr
#' the arb file name and the output name (useful if the name is generated randomly) \cr
#' (Une liste de deux éléments : le nom du fichier arb, le nom
#' fichiers en sortie (utile pour récupérer les noms générés aléatoirement).)
#'
Expand Down
6 changes: 3 additions & 3 deletions R/tab_rda.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ write_rda_tab <- function(info_vars) {
#' (Variable indiquant le secret primaire de type booléen:
#' prend la valeur "TRUE" quand les cellules du tableau doivent être masquées
#' par le secret primaire, "FALSE" sinon. Permet de créer un fichier d'apriori)
#' @param secret_var Nae of the boolean variable which specifies the secret, primary or not :
#' @param secret_var Name 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. \cr
#' (Variable indiquant le secret de type booléen:
Expand Down Expand Up @@ -265,7 +265,7 @@ write_rda_tab <- function(info_vars) {
#' `<TOTCODE> "global"` pour toutes les variables catégorielles
#' sauf `size` and `income`} qui se verront affecter
#' le total : `<TOTCODE> "total"`
#' Par defaut : `<TOTCODE> "Total"`
#' Par défaut : `<TOTCODE> "Total"`
#' }
#'
#'
Expand Down Expand Up @@ -297,7 +297,7 @@ write_rda_tab <- function(info_vars) {
#' Les éléments du vecteur en paramètre doivent nommés (avec le nom de la variable),
#' même s'il n'y a qu'un seul élément.
#'
#'*Exemple :*`c(category="category.hrc")`)
#' *Exemple :* `c(category="category.hrc")`
#'
#'
#' @section Number of decimals:
Expand Down
2 changes: 1 addition & 1 deletion R/tab_rtauargus.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @param 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.
#' @param dir_name string indicated the path of the directory in which to save
#' @param dir_name string indicating the path of the directory in which to save
#' all the files (.rda, .hst, .txt, .arb, .csv) generated by the function.
#' @param summary_secret If `TRUE`, a statistical summary of the suppression is provided along with the masked data.
#' @param unif_labels boolean, if explanatory variables have to be standardized
Expand Down
6 changes: 3 additions & 3 deletions R/writehrc.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ vect_aro <- Vectorize(arobase, vectorize.args = c("string", "number"))
#' Si TRUE, inverse l'ordre des colonnes.
#' @param hier_lead_string character. (Single) character indicating the
#' hierarchy depth in the .hrc file. By default, the value is set to the current
#' value mentionned in the package options (i.e. "@" at the package startup).
#' value mentioned in the package options (i.e. "@" at the package startup).
#' \cr
#' Caractère unique repérant le niveau de profondeur dans le .hrc
#' @param adjust_unique_roots boolean. If TRUE (default) will add fictional roots to the
Expand All @@ -83,13 +83,13 @@ vect_aro <- Vectorize(arobase, vectorize.args = c("string", "number"))
#' character Si adjust_unique_roots est TRUE add_char est l'élément qui sera
#' utilisé afin de créer des feuilles fictives, il faut être sur que cela
#' ne crée pas de doublons dans la hiérarchie.La chaine de caractère sera
#' ajouté au début d'une feuille unique. Par defaut :"ZZZ"
#' ajouté au début d'une feuille unique. Par défaut : "ZZZ"
#' @details Creates a .hrc hierarchy file adapted to tau-Argus from a
#' correspondence table fully describing it. By default, lines are sorted
#' alphabetically so as to regroup identical levels.
#'
#' Ecrit un fichier de hiérarchie .hrc lisible par tau-Argus à
#' partir d'une table de corrrespondance la décrivant complètement. Par défaut,
#' partir d'une table de correspondance la décrivant complètement. Par défaut,
#' les lignes du tableau seront triées afin de regrouper les niveaux de
#' hiérarchie identiques.
#'
Expand Down
2 changes: 1 addition & 1 deletion man/analyse_metadata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/micro_arb.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading