From 16cb9ab3c0bc4df885d8449a9a22129e35d48749 Mon Sep 17 00:00:00 2001 From: Kathryn Doering Date: Thu, 7 Oct 2021 09:14:22 -0400 Subject: [PATCH] fix: example errors --- NAMESPACE | 1 + R/utils.R | 9 +++++---- man/get_input_value.Rd | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 02be978c..e778823e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -12,6 +12,7 @@ export(plot_index_sampling) export(run_EM) export(run_SSMSE) export(run_ss_model) +export(set_MSE_seeds) import(ggplot2) import(parallel) import(r4ss) diff --git a/R/utils.R b/R/utils.R index 021291a3..fc308d90 100644 --- a/R/utils.R +++ b/R/utils.R @@ -329,14 +329,14 @@ clean_init_mod_files <- function(OM_out_dir, EM_out_dir = NULL, MS = "EM", #' "value" = c(2, 2, 2, 3, 3), #' "se_log" = 0.2 #' ) -#' get_input_value( +#' SSMSE:::get_input_value( #' data = dfr, method = "most_common_value", colname = "se_log", #' group = "value" #' ) -#' get_input_value(data = dfr, method = "most_common_value", colname = "value") -#' get_input_value(data = dfr, method = "only_value", colname = "se_log") +#' SSMSE:::get_input_value(data = dfr, method = "most_common_value", colname = "value") +#' SSMSE:::get_input_value(data = dfr, method = "only_value", colname = "se_log") #' # generates an error: -#' # get_input_value(data = dfr, method = "only_value", colname = "value") +#' # SSMSE:::get_input_value(data = dfr, method = "only_value", colname = "value") get_input_value <- function(data, method = "most_common_value", colname, @@ -699,6 +699,7 @@ combine_cols <- function(dat_list, list_item, colnames) { #' Can be 1) NULL (default); 2) An integer vector of length 1, length 1+length(scen_name_vec), or length 1 + length(scen_name_vec)+sum(iter_vec); 3) A list with 3 components the same as teh output of set_MSE_seeds #' @param iter_vec The number of iterations per scenario. A vector of integers #' in the same order as scen_name_vec. +#' @export #' @returns A list of length 3 with 1) the global seed value; 2) the scenario seed values; and 3) the iteration seed values. #' @examples #' seeds <- set_MSE_seeds(seed = seq(10, 80, by = 10), iter_vec = c(2, 3)) diff --git a/man/get_input_value.Rd b/man/get_input_value.Rd index 3cf16edb..3a8746f6 100644 --- a/man/get_input_value.Rd +++ b/man/get_input_value.Rd @@ -40,14 +40,14 @@ dfr <- data.frame( "value" = c(2, 2, 2, 3, 3), "se_log" = 0.2 ) -get_input_value( +SSMSE:::get_input_value( data = dfr, method = "most_common_value", colname = "se_log", group = "value" ) -get_input_value(data = dfr, method = "most_common_value", colname = "value") -get_input_value(data = dfr, method = "only_value", colname = "se_log") +SSMSE:::get_input_value(data = dfr, method = "most_common_value", colname = "value") +SSMSE:::get_input_value(data = dfr, method = "only_value", colname = "se_log") # generates an error: -# get_input_value(data = dfr, method = "only_value", colname = "value") +# SSMSE:::get_input_value(data = dfr, method = "only_value", colname = "value") } \author{ Kathryn Doering