From 62d18863d3e4583f254632cf3ce0f3049903af34 Mon Sep 17 00:00:00 2001 From: Utkarsh Date: Wed, 11 Mar 2026 15:38:06 +0530 Subject: [PATCH 1/2] Fix assignment-in-call bug --- NEWS.md | 1 + R/mcmc-traces.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 25c323e3..1e65c684 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # bayesplot (development version) +* Fix assignment-in-call bug in `mcmc_trace_ucdf`/`mcmc_trace_rcdf`: `L <- n_chain` (which leaked `L` into the calling environment) corrected to `L = n_chain` (#). * New functions `mcmc_dots` and `mcmc_dots_by_chain` for dot plots of MCMC draws by @behramulukir (#402) * Default to `quantiles=100` for all dot plots by @behramulukir (#402) diff --git a/R/mcmc-traces.R b/R/mcmc-traces.R index 57449883..74179f42 100644 --- a/R/mcmc-traces.R +++ b/R/mcmc-traces.R @@ -508,7 +508,7 @@ mcmc_rank_ecdf <- } else { K }, - L <- n_chain + L = n_chain ) data_lim <- data.frame( upper = lims$upper / n_iter - (plot_diff == TRUE) * x, From 24c208c3bf8981825afad8c26fdfbb8830379d76 Mon Sep 17 00:00:00 2001 From: Utkarsh Date: Wed, 11 Mar 2026 21:46:29 +0530 Subject: [PATCH 2/2] fixed NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 98c0281c..b223f663 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # bayesplot (development version) -* Fix assignment-in-call bug in `mcmc_trace_ucdf`/`mcmc_trace_rcdf`: `L <- n_chain` (which leaked `L` into the calling environment) corrected to `L = n_chain` (#). +* Fix assignment-in-call bug in `mcmc_rank_ecdf()` (#). * Replaced deprecated `dplyr` and `tidyselect` functions (`top_n`, `one_of`, `group_indices`) with their modern equivalents to ensure future compatibility. (#431) * Documentation added for all exported `*_data()` functions (#209) * Improved documentation for `binwidth`, `bins`, and `breaks` arguments to clarify they are passed to `ggplot2::geom_area()` and `ggdist::stat_dots()` in addition to `ggplot2::geom_histogram()`