@@ -69,11 +69,6 @@ test_that("mcmc_pairs returns a bayesplot_grid object", {
6969 expect_bayesplot_grid(g )
7070 expect_equal(print(g ), plot(g ))
7171 expect_bayesplot_grid(mcmc_pairs(arr , pars = " sigma" , regex_pars = " beta" ))
72- expect_bayesplot_grid(mcmc_pairs(arr , regex_pars = " x:[1-3]" ,
73- transformations = " exp" ,
74- diag_fun = " dens" , off_diag_fun = " hex" ,
75- diag_args = list (trim = FALSE ),
76- off_diag_args = list (binwidth = c(0.5 , 0.5 ))))
7772 expect_bayesplot_grid(mcmc_pairs(drawsarr , pars = " mu" , regex_pars = " theta" ))
7873
7974 expect_bayesplot_grid(suppressWarnings(mcmc_pairs(arr1chain , regex_pars = " beta" )))
@@ -83,6 +78,15 @@ test_that("mcmc_pairs returns a bayesplot_grid object", {
8378 expect_bayesplot_grid(mcmc_pairs(dframe_multiple_chains , regex_pars = " beta" ))
8479})
8580
81+ test_that(" mcmc_pairs using hexbin works" , {
82+ skip_if_not_installed(" hexbin" )
83+ expect_bayesplot_grid(mcmc_pairs(arr , regex_pars = " x:[1-3]" ,
84+ transformations = " exp" ,
85+ diag_fun = " dens" , off_diag_fun = " hex" ,
86+ diag_args = list (trim = FALSE ),
87+ off_diag_args = list (binwidth = c(0.5 , 0.5 ))))
88+ })
89+
8690test_that(" no mcmc_pairs non-NUTS 'condition's fail" , {
8791 expect_bayesplot_grid(
8892 mcmc_pairs(arr , pars = " sigma" , regex_pars = " beta" ,
@@ -116,7 +120,7 @@ test_that("mcmc_pairs works with NUTS info", {
116120 p <- mcmc_pairs(
117121 post ,
118122 pars = c(" wt" , " am" ),
119- off_diag_fun = " hex " ,
123+ off_diag_fun = " scatter " ,
120124 condition = pairs_condition(nuts = " lp__" ),
121125 lp = lp ,
122126 np = np ,
0 commit comments