From 814bb3d107e03a6a50073284a06836a20026fe76 Mon Sep 17 00:00:00 2001 From: jgabry Date: Mon, 19 Dec 2016 20:09:07 -0500 Subject: [PATCH] reduce example time --- R/bayesplot-colors.R | 4 ++-- R/bayesplot-package.R | 3 ++- R/mcmc-diagnostics.R | 3 ++- R/mcmc-distributions.R | 3 ++- man/MCMC-diagnostics.Rd | 3 ++- man/MCMC-distributions.Rd | 3 ++- man/bayesplot-colors.Rd | 4 ++-- man/bayesplot-package.Rd | 3 ++- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/R/bayesplot-colors.R b/R/bayesplot-colors.R index 16ec1b88..bb9d2457 100644 --- a/R/bayesplot-colors.R +++ b/R/bayesplot-colors.R @@ -84,11 +84,11 @@ #' y <- example_y_data() #' yrep <- example_yrep_draws() #' ppc_stat(y, yrep, stat = "mean") + legend_none() -#' +#' \donttest{ #' color_scheme_set("mix-teal-pink") #' ppc_stat(y, yrep, stat = "sd") + legend_none() #' mcmc_areas(x, regex_pars = "beta") -#' +#' } #' ########################### #' ### custom color scheme ### #' ########################### diff --git a/R/bayesplot-package.R b/R/bayesplot-package.R index f90b1e2e..7cb5a127 100644 --- a/R/bayesplot-package.R +++ b/R/bayesplot-package.R @@ -89,9 +89,10 @@ #' y <- example_y_data() #' yrep <- example_yrep_draws() #' ppc_dens_overlay(y, yrep[1:50, ]) -#' +#' \donttest{ #' color_scheme_set("pink") #' ppc_stat(y, yrep, stat = "median") + grid_lines() #' ppc_hist(y, yrep[1:8, ]) +#' } #' NULL diff --git a/R/mcmc-diagnostics.R b/R/mcmc-diagnostics.R index fe93af04..6a6fbf67 100644 --- a/R/mcmc-diagnostics.R +++ b/R/mcmc-diagnostics.R @@ -61,6 +61,7 @@ #' #' color_scheme_set("green") #' mcmc_acf(x, pars = c("alpha", "beta[1]")) +#' \donttest{ #' color_scheme_set("pink") #' (p <- mcmc_acf_bar(x, pars = c("alpha", "beta[1]"))) #' @@ -68,7 +69,7 @@ #' p + #' yaxis_ticks() + #' hline_at(0.5, linetype = 2, size = 0.15, color = "gray") -#' +#' } #' #' # fake rhat values to use for demonstration #' rhat <- c(runif(100, 1, 1.15)) diff --git a/R/mcmc-distributions.R b/R/mcmc-distributions.R index 7f31673d..724bb7a4 100644 --- a/R/mcmc-distributions.R +++ b/R/mcmc-distributions.R @@ -56,8 +56,9 @@ #' # histograms of some parameters #' color_scheme_set("pink") #' mcmc_hist(x, pars = c("alpha", "beta[2]")) +#' \donttest{ #' mcmc_hist(x, pars = "sigma", regex_pars = "beta") -#' +#' } #' # example of using 'transformations' argument to plot log(sigma), #' # and parsing facet labels (e.g. to get greek letters for parameters) #' mcmc_hist(x, transformations = list(sigma = "log"), diff --git a/man/MCMC-diagnostics.Rd b/man/MCMC-diagnostics.Rd index fc6360d4..4e4c7bd7 100644 --- a/man/MCMC-diagnostics.Rd +++ b/man/MCMC-diagnostics.Rd @@ -105,6 +105,7 @@ dimnames(x) color_scheme_set("green") mcmc_acf(x, pars = c("alpha", "beta[1]")) +\donttest{ color_scheme_set("pink") (p <- mcmc_acf_bar(x, pars = c("alpha", "beta[1]"))) @@ -112,7 +113,7 @@ color_scheme_set("pink") p + yaxis_ticks() + hline_at(0.5, linetype = 2, size = 0.15, color = "gray") - +} # fake rhat values to use for demonstration rhat <- c(runif(100, 1, 1.15)) diff --git a/man/MCMC-distributions.Rd b/man/MCMC-distributions.Rd index 6422abd0..a09b9d09 100644 --- a/man/MCMC-distributions.Rd +++ b/man/MCMC-distributions.Rd @@ -113,8 +113,9 @@ mcmc_hist(x) # histograms of some parameters color_scheme_set("pink") mcmc_hist(x, pars = c("alpha", "beta[2]")) +\donttest{ mcmc_hist(x, pars = "sigma", regex_pars = "beta") - +} # example of using 'transformations' argument to plot log(sigma), # and parsing facet labels (e.g. to get greek letters for parameters) mcmc_hist(x, transformations = list(sigma = "log"), diff --git a/man/bayesplot-colors.Rd b/man/bayesplot-colors.Rd index 0b0fcc42..2d45012b 100644 --- a/man/bayesplot-colors.Rd +++ b/man/bayesplot-colors.Rd @@ -97,11 +97,11 @@ color_scheme_view() y <- example_y_data() yrep <- example_yrep_draws() ppc_stat(y, yrep, stat = "mean") + legend_none() - +\donttest{ color_scheme_set("mix-teal-pink") ppc_stat(y, yrep, stat = "sd") + legend_none() mcmc_areas(x, regex_pars = "beta") - +} ########################### ### custom color scheme ### ########################### diff --git a/man/bayesplot-package.Rd b/man/bayesplot-package.Rd index 965a1029..5275b23a 100644 --- a/man/bayesplot-package.Rd +++ b/man/bayesplot-package.Rd @@ -87,10 +87,11 @@ mcmc_scatter(x, pars = c("beta[1]", "sigma"), y <- example_y_data() yrep <- example_yrep_draws() ppc_dens_overlay(y, yrep[1:50, ]) - +\donttest{ color_scheme_set("pink") ppc_stat(y, yrep, stat = "median") + grid_lines() ppc_hist(y, yrep[1:8, ]) +} } \seealso{