# Runs everywhere, no extra packages, no session side effects
colleyRstats::colleyRstats_setup(
set_options = FALSE,
set_theme = FALSE,
set_conflicts = FALSE,
print_citation = FALSE,
verbose = FALSE
)
# \donttest{
# Full setup (requires suggested packages; changes session defaults)
if (requireNamespace("ggplot2", quietly = TRUE) &&
requireNamespace("see", quietly = TRUE)) {
local({
old_theme <- ggplot2::theme_get()
on.exit(ggplot2::theme_set(old_theme), add = TRUE)
colleyRstats::colleyRstats_setup(
set_options = FALSE,
set_conflicts = FALSE, # avoid persisting conflict prefs in checks
print_citation = FALSE,
verbose = TRUE
)
ggplot2::ggplot(mtcars, ggplot2::aes(mpg, wt)) +
ggplot2::geom_point()
})
}
# }
Run the code above in your browser using DataLab