Skip to content

Commit b9f7819

Browse files
committed
Merge branch 'master' into pr/260
2 parents 479fded + c6919eb commit b9f7819

File tree

81 files changed

+9980
-6961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+9980
-6961
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
inst/doc
66

77
tests/testthat/Rplots.pdf
8+
tests/testthat/_snaps/
89

910
.DS_Store
1011

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: bayesplot
22
Type: Package
33
Title: Plotting for Bayesian Models
4-
Version: 1.8.0.9000
5-
Date: 2021-01-07
4+
Version: 1.8.1.9000
5+
Date: 2021-06-13
66
Authors@R: c(person("Jonah", "Gabry", role = c("aut", "cre"), email = "jsg2201@columbia.edu"),
77
person("Tristan", "Mahr", role = "aut"),
88
person("Paul-Christian", "Bürkner", role = "ctb"),
@@ -21,7 +21,6 @@ Description: Plotting functions for posterior analysis, MCMC diagnostics,
2121
developers working on a variety of R packages for Bayesian modeling,
2222
particularly (but not exclusively) packages interfacing with 'Stan'.
2323
License: GPL (>= 3)
24-
LazyData: TRUE
2524
URL: https://mc-stan.org/bayesplot/
2625
BugReports: https://github.com/stan-dev/bayesplot/issues/
2726
SystemRequirements: pandoc (>= 1.12.3), pandoc-citeproc
@@ -32,6 +31,7 @@ Imports:
3231
ggplot2 (>= 3.0.0),
3332
ggridges,
3433
glue,
34+
posterior,
3535
reshape2,
3636
rlang (>= 0.3.0),
3737
stats,
@@ -54,7 +54,7 @@ Suggests:
5454
survival,
5555
testthat (>= 2.0.0),
5656
vdiffr
57-
RoxygenNote: 7.1.1
57+
RoxygenNote: 7.1.2
5858
VignetteBuilder: knitr
5959
Encoding: UTF-8
6060
Roxygen: list(markdown = TRUE)

NEWS.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
<!-- See http://style.tidyverse.org/news.html for advice on writing news -->
22

3-
# bayesplot 1.8.0.9000
3+
# bayesplot 1.8.1.9000
44

5-
### New features
5+
* `mcmc_*()` functions now support all draws formats from the **posterior** package. (#277, @Ozan147)
6+
7+
* `mcmc_dens()` and `mcmc_dens_overlay()` gain arguments for controlling the
8+
the density calculation. (#258)
9+
10+
* `mcmc_hist()` and `mcmc_dens()` gain argument `alpha` for controlling transparency. (#244)
11+
12+
* `mcmc_areas()` and `mcmc_areas_ridges()` gain an argument `border_size` for
13+
controlling the thickness of the ridgelines. (#224)
614

715
* New plotting function `ppc_km_overlay_grouped()`, the grouped variant of
8-
`ppc_km_overlay()`. (#260)
16+
`ppc_km_overlay()`. (#260, @fweber144)
917

18+
# bayesplot 1.8.1
19+
20+
* Fix R cmd check error on linux for CRAN
1021

1122
# bayesplot 1.8.0
1223

@@ -27,7 +38,7 @@
2738
* New plotting function `ppc_km_overlay()` for outcome variables that are
2839
right-censored. Empirical CCDF estimates of `yrep` are compared with the
2940
Kaplan-Meier estimate of `y`. (#233, #234, @fweber144)
30-
41+
3142
* `ppc_loo_pit_overlay()` now uses a boundary correction for an improved kernel
3243
density estimation. The new argument `boundary_correction` defaults to TRUE but
3344
can be set to FALSE to recover the old version of the plot. (#171, #235,
@@ -36,7 +47,7 @@
3647
* CmdStanMCMC objects (from CmdStanR) can now be used with extractor
3748
functions `nuts_params()`, `log_posterior()`, `rhat()`, and
3849
`neff_ratio()`. (#227)
39-
50+
4051
* On the y axis, `ppc_loo_pit_qq(..., compare = "normal")` now plots standard
4152
normal quantiles calculated from the PIT values (instead of the standardized
4253
PIT values). (#240, #243, @fweber144)

R/helpers-mcmc.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ prepare_mcmc_array <- function(x,
99
pars = character(),
1010
regex_pars = character(),
1111
transformations = list()) {
12-
if (is_df_with_chain(x)) {
12+
if (posterior::is_draws(x)) {
13+
x <- posterior::as_draws_array(x)
14+
} else if (is_df_with_chain(x)) {
1315
x <- df_with_chain2array(x)
1416
} else if (is_chain_list(x)) {
1517
# this will apply to mcmc.list and similar objects

0 commit comments

Comments
 (0)