Skip to content

Commit 8c0c179

Browse files
authored
Merge pull request #43 from InseeFrLab/debug_multi
Improve the reporting of common cells
2 parents c824870 + 5b0c3a1 commit 8c0c179

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: rtauargus
22
Type: Package
33
Title: Using Tau-Argus from R
44
Language: fr
5-
Version: 1.3.3
5+
Version: 1.3.4
66
Depends: R (>= 3.5.0)
77
Imports:
88
purrr (>= 0.2),

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ subtitle: History of changes / Historique des modifications
44
output: rmarkdown::html_vignette
55
---
66

7+
## rtauargus 1.3.4
8+
9+
[06/2026]
10+
11+
Improving the reporting of common cells in `tab_multi_manager()`.
12+
713

814
## rtauargus 1.3.3
915

R/multitable.R

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,12 @@ tab_multi_manager <- function(
444444
lignes_modifs <- which(table_majeure[[var_secret_apriori]] != table_majeure[[var_secret]])
445445

446446
cur_tab <- paste0("T_", num_tableau)
447-
common_cells <- unique(
448-
purrr::map_dfr(
449-
setdiff(noms_col_T, cur_tab),
450-
function(col_T){
451-
table_majeure[table_majeure[[col_T]] & table_majeure[[cur_tab]],]
452-
}
453-
)
454-
)
447+
other_tabs <- setdiff(noms_col_T, cur_tab)
448+
cur_cells <- rowSums(table_majeure[, cur_tab, drop=FALSE])
449+
other_cells <- rowSums(table_majeure[, other_tabs, drop=FALSE])
450+
451+
common_cells_rows <- which(cur_cells == 1 & other_cells > 0)
452+
common_cells <- table_majeure[common_cells_rows, , drop=FALSE]
455453

456454
# update of common cells that have been modified
457455
modified <- common_cells[common_cells[[var_secret_apriori]] != common_cells[[var_secret]],all_expl_vars, drop=FALSE]

0 commit comments

Comments
 (0)