Skip to content

Commit

Permalink
Fix smoother parsing with glmmTMB>=1.1.8 #260 #261
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Oct 10, 2023
1 parent a48fd1c commit ca11eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,8 @@ sdmTMB <- function(
contains_offset <- check_offset(formula[[ii]])

# anything in a list here needs to be saved for tmb data
split_formula[[ii]] <- glmmTMB::splitForm(formula[ii][[1]])
formula_no_sm <- remove_s_and_t2(formula[[ii]])
split_formula[[ii]] <- glmmTMB::splitForm(formula_no_sm)
RE_names <- barnames(split_formula[[ii]]$reTrmFormulas)

fct_check <- vapply(RE_names, function(x) check_valid_factor_levels(data[[x]], .name = x), TRUE)
Expand All @@ -834,7 +835,6 @@ sdmTMB <- function(
formula[[ii]] <- split_formula[[ii]]$fixedFormula
ln_tau_G_index[[ii]] <- unlist(lapply(seq_along(nobs_RE[[ii]]), function(i) rep(i, each = nobs_RE[[ii]][i]))) - 1L

formula_no_sm <- remove_s_and_t2(formula[[ii]])
X_ij[[ii]] <- model.matrix(formula_no_sm, data)
mf[[ii]] <- model.frame(formula_no_sm, data)
# Check for random slopes:
Expand Down

0 comments on commit ca11eb4

Please sign in to comment.