diff --git a/DESCRIPTION b/DESCRIPTION index fcafce0..77da1a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: rtauargus Type: Package Title: Using Tau-Argus from R Language: fr -Version: 1.3.3 +Version: 1.3.4 Depends: R (>= 3.5.0) Imports: purrr (>= 0.2), diff --git a/NEWS.md b/NEWS.md index aa16706..104e52d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,12 @@ subtitle: History of changes / Historique des modifications output: rmarkdown::html_vignette --- +## rtauargus 1.3.4 + +[06/2026] + +Improving the reporting of common cells in `tab_multi_manager()`. + ## rtauargus 1.3.3 diff --git a/R/multitable.R b/R/multitable.R index c88aac9..3e7e3fd 100644 --- a/R/multitable.R +++ b/R/multitable.R @@ -444,14 +444,12 @@ tab_multi_manager <- function( lignes_modifs <- which(table_majeure[[var_secret_apriori]] != table_majeure[[var_secret]]) cur_tab <- paste0("T_", num_tableau) - common_cells <- unique( - purrr::map_dfr( - setdiff(noms_col_T, cur_tab), - function(col_T){ - table_majeure[table_majeure[[col_T]] & table_majeure[[cur_tab]],] - } - ) - ) + other_tabs <- setdiff(noms_col_T, cur_tab) + cur_cells <- rowSums(table_majeure[, cur_tab, drop=FALSE]) + other_cells <- rowSums(table_majeure[, other_tabs, drop=FALSE]) + + common_cells_rows <- which(cur_cells == 1 & other_cells > 0) + common_cells <- table_majeure[common_cells_rows, , drop=FALSE] # update of common cells that have been modified modified <- common_cells[common_cells[[var_secret_apriori]] != common_cells[[var_secret]],all_expl_vars, drop=FALSE]