Skip to content

Commit

Permalink
Wrap slower examples in donttest
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRegular committed Sep 15, 2023
1 parent 8a489a4 commit 0378248
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.1.6
Date: 2023-09-15 14:36:22 UTC
SHA: ffef972b998aa57344055c9e8d19428ec2bcb12d
Date: 2023-09-15 16:02:07 UTC
SHA: 8a489a48ddcde0fd7b4554e983c3c3b9ffd77acf
12 changes: 8 additions & 4 deletions R/run_strat.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ strat_means <- function(data = NULL, metric = NULL, strat_groups = NULL,
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:3, years = 1:3,
#' \donttest{
#' sim <- sim_abundance(ages = 1:5, years = 1:5,
#' R = sim_R(log_mean = log(1e+7)),
#' growth = sim_vonB(length_group = 1)) %>%
#' sim_distribution(grid = make_grid(res = c(22, 22)),
#' sim_distribution(grid = make_grid(res = c(20, 20)),
#' ays_covar = sim_ays_covar(sd = 1)) %>%
#' sim_survey(n_sims = 1, q = sim_logistic(k = 2, x0 = 3)) %>%
#' run_strat()
#' }
#'
#' @export
#'
Expand Down Expand Up @@ -272,14 +274,16 @@ run_strat <- function(sim,
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:3, years = 1:3,
#' \donttest{
#' sim <- sim_abundance(ages = 1:5, years = 1:5,
#' R = sim_R(log_mean = log(1e+7)),
#' growth = sim_vonB(length_group = 1)) %>%
#' sim_distribution(grid = make_grid(res = c(22, 22)),
#' sim_distribution(grid = make_grid(res = c(20, 20)),
#' ays_covar = sim_ays_covar(sd = 1)) %>%
#' sim_survey(n_sims = 1, q = sim_logistic(k = 2, x0 = 3)) %>%
#' run_strat() %>%
#' strat_error()
#' }
#'
#' @export
#'
Expand Down
6 changes: 4 additions & 2 deletions R/sim_dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,16 @@ sim_nlf <- function(formula = ~ alpha - ((depth - mu) ^ 2) / (2 * sigma ^ 2),
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:3, years = 1:3) %>%
#' sim_distribution(grid = make_grid(res = c(22, 22)),
#' \donttest{
#' sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20)),
#' ays_covar = sim_ays_covar(phi_age = 0.8,
#' phi_year = 0.1),
#' depth_par = sim_parabola(mu = 200,
#' sigma = 50))
#' head(sim$sp_N)
#' head(sim$grid_xy)
#' }
#'
#' @export
#'
Expand Down
13 changes: 7 additions & 6 deletions R/sim_survey.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ round_sim <- function(sim) {
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:3, years = 1:3) %>%
#' sim_distribution(grid = make_grid(res = c(22, 22)))
#'\donttest{
#' sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20)))
#'
#' ## Multiple calls can be useful for defining a custom series of sets
#' standard_sets <- sim_sets(sim, year <= 2, set_den = 2 / 1000)
Expand All @@ -74,7 +75,7 @@ round_sim <- function(sim) {
#' sets$set <- seq(nrow(sets)) # Important - make sure set has a unique ID.
#'
#' survey <- sim_survey(sim, custom_sets = sets)
#' \donttest{
#'
#' plot_survey(survey, which_year = 3, which_sim = 1)
#' }
#'
Expand Down Expand Up @@ -166,10 +167,10 @@ sim_sets <- function(sim, subset_cells, n_sims = 1, trawl_dim = c(1.5, 0.02),
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:3, years = 1:3) %>%
#' sim_distribution(grid = make_grid(res = c(22, 22))) %>%
#'\donttest{
#' sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20))) %>%
#' sim_survey(n_sims = 5, q = sim_logistic(k = 2, x0 = 3))
#' \donttest{
#' plot_survey(sim, which_year = 3, which_sim = 1)
#' }
#'
Expand Down
6 changes: 4 additions & 2 deletions man/run_strat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/sim_distribution.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/sim_sets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/sim_survey.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/strat_error.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0378248

Please sign in to comment.