From 08d437ae9662caf7c3b36d3994b355a0ef555435 Mon Sep 17 00:00:00 2001 From: Jan Marvin Garbuszus Date: Wed, 8 Nov 2023 08:54:42 +0100 Subject: [PATCH 1/2] [pt] pass characters to item_order --- R/helper-functions.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/helper-functions.R b/R/helper-functions.R index c0662131a..d643a1357 100644 --- a/R/helper-functions.R +++ b/R/helper-functions.R @@ -654,6 +654,8 @@ get_items <- function(data, x, item_order, slicer = FALSE, choose = NULL) { if (is.null(item_order)) { item_order <- order(dat) + } else if (is.character(item_order)) { + item_order <- match(dat, item_order) } if (!is.null(choose)) { From 98f82d66a65acc8ab09f403b85795bf912d1e23a Mon Sep 17 00:00:00 2001 From: Jan Marvin Garbuszus Date: Wed, 8 Nov 2023 09:24:51 +0100 Subject: [PATCH 2/2] [pt] allow slicer variables to contain whitespaces --- R/class-workbook.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/class-workbook.R b/R/class-workbook.R index 1ecdfe483..ec9e57585 100644 --- a/R/class-workbook.R +++ b/R/class-workbook.R @@ -1522,7 +1522,7 @@ wbWorkbook <- R6::R6Class( sel <- which(pt$name == pivot_table) cid <- pt$cacheId[sel] - uni_name <- paste0(slicer, cid) + uni_name <- paste0(stringi::stri_replace_all_fixed(slicer, ' ', '_'), cid) ### slicer_cache sortOrder <- NULL