Skip to content

Commit

Permalink
More edits of examples to try and avoid CPU time NOTE
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRegular committed Sep 15, 2023
1 parent 4179573 commit 5baa17c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 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-08-14 18:20:59 UTC
SHA: c668121f923298bc89ca6e26b4c06f5cff7bf50a
Date: 2023-08-15 11:32:14 UTC
SHA: 4179573bfad1f0350c412bcdc77893aa206862e3
4 changes: 2 additions & 2 deletions R/run_strat.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ strat_means <- function(data = NULL, metric = NULL, strat_groups = NULL,
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:5, years = 1:5,
#' sim <- sim_abundance(ages = 1:4, years = 1:4,
#' R = sim_R(log_mean = log(1e+7)),
#' growth = sim_vonB(length_group = 1)) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20)),
Expand Down Expand Up @@ -272,7 +272,7 @@ run_strat <- function(sim,
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:5, years = 1:5,
#' sim <- sim_abundance(ages = 1:4, years = 1:4,
#' R = sim_R(log_mean = log(1e+7)),
#' growth = sim_vonB(length_group = 1)) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20)),
Expand Down
6 changes: 4 additions & 2 deletions R/sim_dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ sim_parabola <- function(alpha = 0, mu = 200, sigma = 70, sigma_right = NULL,
#' plot_ly(x = ~depth, y = ~depth_effect, split = ~age) %>%
#' add_lines()
#'
#' @importFrom lifecycle badge
#'
sim_nlf <- function(formula = ~ alpha - ((depth - mu) ^ 2) / (2 * sigma ^ 2),
coeff = list(alpha = 0, mu = 200, sigma = 70)) {

Expand Down Expand Up @@ -323,8 +325,8 @@ sim_nlf <- function(formula = ~ alpha - ((depth - mu) ^ 2) / (2 * sigma ^ 2),
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:10, years = 1:10) %>%
#' sim_distribution(grid = make_grid(res = c(12, 12)),
#' sim <- sim_abundance(ages = 1:4, years = 1:4) %>%
#' 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,
Expand Down
2 changes: 1 addition & 1 deletion R/sim_dist_spde.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#' mesh = my_mesh),
#' depth_par = sim_parabola(mu = 200,
#' sigma = 50))
#' plot_distribution(sim,ages = 1:5, years = 1:5, type = "heatmap")
#' plot_distribution(sim, ages = 1:5, years = 1:5, type = "heatmap")
#'
#'
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/sim_survey.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ round_sim <- function(sim) {
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
#' sim <- sim_abundance(ages = 1:4, years = 1:4) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20)))
#'
#' ## Multiple calls can be useful for defining a custom series of sets
Expand Down Expand Up @@ -166,7 +166,7 @@ sim_sets <- function(sim, subset_cells, n_sims = 1, trawl_dim = c(1.5, 0.02),
#'
#' @examples
#'
#' sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
#' sim <- sim_abundance(ages = 1:4, years = 1:4) %>%
#' sim_distribution(grid = make_grid(res = c(20, 20))) %>%
#' sim_survey(n_sims = 5, q = sim_logistic(k = 2, x0 = 3))
#' \donttest{
Expand Down

0 comments on commit 5baa17c

Please sign in to comment.