From 4740aa500e0cbf1e4ec094c873f7c2a4286a74e1 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Tue, 3 Dec 2024 12:21:05 -0500 Subject: [PATCH] issue #1290 : Encoding for collapse term column --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/get_draws.R | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b40febcaa..00826813c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: marginaleffects Title: Predictions, Comparisons, Slopes, Marginal Means, and Hypothesis Tests -Version: 0.24.0.2 +Version: 0.24.0.3 Authors@R: c(person(given = "Vincent", family = "Arel-Bundock", diff --git a/NEWS.md b/NEWS.md index 73ee669a5..6e4bc9154 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ * Version 0.24.0 accidentally removed the "contrast" column from the output object in calls with only one focal predictor. This column is reinstated. * More informative warning for `lme4` and `glmmTMB` models with `re.form=NULL` +Bugs: + +* Encoding issue in bayesian models with `by`. Thanks to @Koalha for report #1290. + ## 0.24.0 Breaking change: diff --git a/R/get_draws.R b/R/get_draws.R index a31636a42..d95d6e331 100644 --- a/R/get_draws.R +++ b/R/get_draws.R @@ -84,6 +84,7 @@ average_draws <- function(data, index, draws, byfun = NULL) { } if (length(index) > 0) { + Encoding(data[["term"]]) <- "UTF-8" g <- collapse::GRP(data, by = index) if (is.null(byfun)) {