Skip to content

Commit b7bc728

Browse files
committed
only run hex example if hexbin installed
1 parent f686b99 commit b7bc728

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

R/mcmc-scatterplots.R

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@
112112
#' size = .75, linetype = 2)
113113
#'
114114
#' \donttest{
115-
#' # hexagonal heatmap
116-
#' color_scheme_set("brightblue")
117-
#' (p <- mcmc_hex(x, pars = c("sigma", "alpha"), transform = list(sigma = "log")))
118-
#' p + plot_bg(fill = "gray95")
119-
#' p + plot_bg(fill = "gray95") + panel_bg(fill = "gray70")
115+
#' if (requireNamespace("hexbin", quietly = TRUE)) {
116+
#' # hexagonal heatmap
117+
#' color_scheme_set("brightblue")
118+
#' (p <- mcmc_hex(x, pars = c("sigma", "alpha"), transform = list(sigma = "log")))
119+
#' p + plot_bg(fill = "gray95")
120+
#' p + plot_bg(fill = "gray95") + panel_bg(fill = "gray70")
121+
#' }
120122
#' }
121123
NULL
122124

0 commit comments

Comments
 (0)