Defaults for g3a_renewal_normalparam
lentinj opened this issue · 1 comments
lentinj commented
diff --git a/R/action_renewal.R b/R/action_renewal.R
index 8d6ceed..3ea0942 100644
--- a/R/action_renewal.R
+++ b/R/action_renewal.R
@@ -139,8 +139,9 @@ g3a_renewal <- function (stock, num_f, wgt_f, run_f = ~TRUE, run_at = 8) {
# Steps to set up renewal of stocks on any stock
g3a_renewal_normalparam <- function (
stock,
- factor_f,
- mean_f,
+ factor_f = g3_parameterized('rec', by_stock = by_stock, by_year = TRUE,
+ scale = 'rec.scalar'),
+ mean_f = g3a_renewal_vonb(by_stock = by_stock),
stddev_f = g3_parameterized('rec.sd', by_stock = by_stock, by_age = by_age),
alpha_f = g3_parameterized('walpha', by_stock = wgt_by_stock),
beta_f = g3_parameterized('wbeta', by_stock = wgt_by_stock),
diff --git a/R/step.R b/R/step.R
index 96e9e91..c1eb610 100644
--- a/R/step.R
+++ b/R/step.R
@@ -103,6 +103,7 @@ g3_step <- function(step_f, recursing = FALSE, orig_env = environment(step_f)) {
for (var_name in all_undefined_vars(f)) { # NB: all_undefined_vars will get rid of definitions from previous loop
defn <- environment(f)[[var_name]]
if (!is.call(defn)) next
+ # TODO: We need to select formula dependents here and consider the recursive all_undefined_vars()
if (!isTRUE(depend_vars) && !('stock_ss' %in% all.names(defn)) && length(intersect(all_undefined_vars(defn), depend_var
# There's a depend vars, but this formula doesn't depend on any of them, optionally modify and return
if (!is.null(filter_fn)) {