Skip to content

Commit

Permalink
check cran
Browse files Browse the repository at this point in the history
  • Loading branch information
julienjamme committed Jan 19, 2024
1 parent 2dbdf49 commit c9a89a5
Show file tree
Hide file tree
Showing 10 changed files with 821 additions and 64 deletions.
6 changes: 6 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
^README\.Rmd$
^tauargus_files/*$
tauargus_files/*
^_pkgdown_old\.yml$
^README\.html$
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ URL: https://inseefrlab.github.io/rtauargus,
https://inseefrlab.github.io/rtauargus/
BugReports: https://github.com/inseefrlab/rtauargus/issues
Roxygen: list(markdown = TRUE)
StagedInstall: no

4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ output: rmarkdown::html_vignette

* Implementation of a method to tackle some tables of 4/5 dimensions.

> The method is quickly explained and its use is shown in a specific vignette.
> The method is quickly explained and its use is shown in a specific vignette (french).
> A paper explaining more deeply the idea and the modus operandi is available
here: "https://github.com/InseeFrLab/dims_reduction_tables_workshop_20231215".

Expand All @@ -25,7 +25,7 @@ according to frequency rule and (1,k)-dominance rule.
* Resolution of a malfunction while dealing with costs.

* **rtauargus()** function has been renamed more properly as **micro_rtauargus()**.
Its arguments remain the same.
Its arguments and its behaviour remain the same.

## rtauargus 1.1.2

Expand Down
3 changes: 2 additions & 1 deletion R/hrc.R
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ df_hierlevels <- function(var_hrc, hierlevels) {
}

lev <- strsplit(hierlevels, " +")[[1]]
lev <- as.integer(lev) %>% `[`(. != 0)
lev <- as.integer(lev)
lev <- lev[lev != 0]
if (sum(lev) != n1) {
stop("la somme de hierlevels doit etre egale au nombre de caracteres")
}
Expand Down
9 changes: 5 additions & 4 deletions R/micro_asc_rda.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ write_rda_1var <- function(info_var) {

}

#' @importFrom dplyr %>%


write_rda <- function(info_vars) {

Expand All @@ -49,10 +49,11 @@ write_rda <- function(info_vars) {
}
info_vars <- lapply(info_vars, chemin_complet)

vapply(info_vars, write_rda_1var, character(1)) %>%
gsub("(\n)+", "\n", .) %>% # plusieurs sauts de lignes par un seul
sub("\n$", "", .) # supprime dernier saut de ligne
res <- vapply(info_vars, write_rda_1var, character(1))
res <- gsub("(\n)+", "\n", res) # plusieurs sauts de lignes par un seul
res <- sub("\n$", "", res) # supprime dernier saut de ligne

return(res)
}

#' Creates asc and rda files from microdata
Expand Down
5 changes: 3 additions & 2 deletions R/sp_restore_format.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ restore_format <- function(masq, res) {

masq_liste_empilee <- unique(do.call("rbind", unname(masq)))

if (class(res$fus_vars) == "character") {
if (is.character(res$fus_vars)) {
# Case with 4 categorical variables
# variable

Expand All @@ -122,7 +122,8 @@ restore_format <- function(masq, res) {
v1_v2 <- paste(v1, v2, sep = sep)

result <- separer4_3(masq_liste_empilee, v1, v2,v1_v2, sep_regex)
return(result)}
return(result)
}

# Case with 5 dimensions
# variable
Expand Down
8 changes: 4 additions & 4 deletions R/tab_rda.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_rda_1var_tab <- function(info_var) {

}

#' @importFrom dplyr %>%

write_rda_tab <- function(info_vars) {


Expand All @@ -112,9 +112,9 @@ write_rda_tab <- function(info_vars) {
}
info_vars <- lapply(info_vars, chemin_complet)

vapply(info_vars, write_rda_1var_tab, character(1)) %>%
gsub("(\n)+", "\n", .) %>% # plusieurs sauts de lignes par un seul
sub("\n$", "", .) # supprime dernier saut de ligne
res <- vapply(info_vars, write_rda_1var_tab, character(1))
res <- gsub("(\n)+", "\n", res) # plusieurs sauts de lignes par un seul
res <- sub("\n$", "", res) # supprime dernier saut de ligne

}

Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
fig.path = "man/figures/README-"
)
```

# rtauargus <a href='https://inseefrlab.github.io/rtauargus/'><img src='man/figures/rtauargus_logo_small.png' align="right" width="120" /></a>

<!-- badges: start -->
[![pipeline status](https://gitlab.insee.fr/outilsconfidentialite/rtauargus/badges/master/pipeline.svg)](https://gitlab.insee.fr/outilsconfidentialite/rtauargus/-/pipelines)
<!-- [![pipeline status](https://gitlab.insee.fr/outilsconfidentialite/rtauargus/badges/master/pipeline.svg)](https://gitlab.insee.fr/outilsconfidentialite/rtauargus/-/pipelines) -->
<!-- badges: end -->

<!--![](vignettes/R_logo_small.png) ![](vignettes/TauBall2_small.png)-->
Expand Down Expand Up @@ -163,5 +163,5 @@ same directory, too. To go further, you can consult the latest version of the
The functions of *rtauargus* calling τ-Argus require that this software be accessible from the workstation. The download of τ-Argus is done on the [dedicated page](https://github.com/sdcTools/tauargus/releases) of the *sdcTools* git repository.

_The package was developed on the basis of open source versions of &tau;-Argus
(versions 4.2 and above), in particular the latest version available at the
time of development (4.2.2b1). It is not compatible with version 3.5.**_
(versions 4.2 and above), in particular the version used for this version is
τ-Argus 4.2.3. It is not compatible with version 3.5.**_
Loading

0 comments on commit c9a89a5

Please sign in to comment.