Skip to content

Commit

Permalink
Fix tidy() bug created by last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Oct 23, 2023
1 parent a7026ab commit 06b918a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions R/tidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ tidy.sdmTMB <- function(x, effects = c("fixed", "ran_pars", "ran_vals"), model =
if (this == "tau_V") this <- "sigma_V"
this_se <- as.numeric(se[[this]])
this_est <- as.numeric(est[[this]])
out_re[[i]] <- data.frame(
term = i, estimate = this_est, std.error = this_se,
conf.low = exp(.e - crit * .se),
conf.high = exp(.e + crit * .se),
stringsAsFactors = FALSE
)

if (length(this_est)) {
out_re[[i]] <- data.frame(
term = i, estimate = this_est, std.error = this_se,
conf.low = exp(.e - crit * .se),
conf.high = exp(.e + crit * .se),
stringsAsFactors = FALSE
)
}
ii <- ii + 1
}
}
Expand Down

0 comments on commit 06b918a

Please sign in to comment.