diff --git a/NEWS.md b/NEWS.md index 49f04a8..c8a2537 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ * Fixed bug on continuous table outside borders. * Fixed bug with early page break when appending content dynamically. * Fixed bug on page numbers in title for RTF. +* Fixed bug where show_cols was overriding `define()` visible = FALSE. # reporter 1.4.3 diff --git a/R/sizing_functions.R b/R/sizing_functions.R index 6678ea1..01d5c8b 100644 --- a/R/sizing_functions.R +++ b/R/sizing_functions.R @@ -993,8 +993,12 @@ get_table_cols <- function(x, control_cols) { if (show_all == FALSE & def$visible) ret[length(ret) + 1] <- def$var_c - else if (show_all == TRUE & def$visible == FALSE) - ret <- ret[!ret %in% def$var_c] + #else if (show_all == TRUE & def$visible == FALSE) + else if (def$visible == FALSE) { + if (def$var_c %in% ret) { + ret <- ret[!ret %in% def$var_c] + } + } } ret <- unique(ret) diff --git a/docs/articles/reporter-wrap.html b/docs/articles/reporter-wrap.html index 1baf8e9..5fac825 100644 --- a/docs/articles/reporter-wrap.html +++ b/docs/articles/reporter-wrap.html @@ -170,7 +170,7 @@
define()
visible = FALSE.-
++
Next: Example 7: Page By