Skip to content

Commit 9b0ed39

Browse files
committed
Fix check error.
Without setting `diag_fun` to a vector of length 1, this line of code causes a warning later on: `diag_fun == "hist" && use_default_binwidth`. This warning raises an error during rcmdcheck::rcmdcheck()
1 parent 691cfea commit 9b0ed39

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/mcmc-scatterplots.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,11 @@ mcmc_pairs <- function(x,
316316
inherits(np_style, "nuts_style"),
317317
inherits(condition, "pairs_condition")
318318
)
319-
plot_diagonal <- pairs_plotfun(match.arg(diag_fun))
320-
plot_off_diagonal <- pairs_plotfun(match.arg(off_diag_fun))
319+
320+
diag_fun <- match.arg(diag_fun)
321+
off_diag_fun <- match.arg(off_diag_fun)
322+
plot_diagonal <- pairs_plotfun(diag_fun)
323+
plot_off_diagonal <- pairs_plotfun(off_diag_fun)
321324

322325
x <- prepare_mcmc_array(x, pars, regex_pars, transformations)
323326
x <- drop_constants_and_duplicates(x)

0 commit comments

Comments
 (0)