From e0be7bb02be6a2f34a3abada6d63644428c5ae63 Mon Sep 17 00:00:00 2001 From: Gabriel Becker Date: Wed, 2 Sep 2020 15:31:25 -0700 Subject: [PATCH] Fix new regression bug in reorder_split_levels. passes checknow. vbump --- DESCRIPTION | 2 +- R/split_funs.R | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e48db38af..75d5e3c18 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rtables Title: Reporting Tables Date: 2019-10-11 -Version: 0.3.2.13 +Version: 0.3.2.14 Authors@R: c( person("Adrian", "Waddell", email = "adrian.waddell@roche.com", role = c("aut", "cre")), person("Gabriel", "Becker", email = "gabembecker@gmail.com", role = "aut"), diff --git a/R/split_funs.R b/R/split_funs.R index 9e49151ed..d2f543228 100644 --- a/R/split_funs.R +++ b/R/split_funs.R @@ -494,8 +494,6 @@ reorder_split_levels = function(neworder, newlabels = neworder, drlevels = TRUE) df2 = df valvec <- df2[[spl_payload(spl)]] vals = if(is.factor(valvec)) levels(valvec) else unique(valvec) - stopifnot(all(neworder %in% vals)) - if(!drlevels) neworder <- c(neworder, setdiff(vals, neworder)) df2[[spl_payload(spl)]] = factor(valvec, levels = neworder)