Skip to content

Commit

Permalink
as.formula -- needs env = .GlobalEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed Dec 20, 2024
1 parent 77abde9 commit d64d2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/objFunSpread.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ utils::globalVariables(c(
if (is(FS_formula, "formula")) {
stop("FS_formula must be provided as a charater string because it takes too much RAM otherwise.")
}
FS_formula <- as.formula(FS_formula)
FS_formula <- as.formula(FS_formula, env = .GlobalEnv)
colsToUse <- attributes(terms(FS_formula))[["term.labels"]]
# How many of the parameters belong to the model?
parsModel <- length(colsToUse)
Expand Down

0 comments on commit d64d2cb

Please sign in to comment.