Skip to content

Commit

Permalink
Minor readability and efficiency improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
fweber144 committed Mar 6, 2023
1 parent 8b76d6c commit f1c661c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/formula.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ parse_additive_terms <- function(terms) {
stop("te() and ti() terms are not supported, please use t2() instead.")
}
smooth <- unname(unlist(sapply(smooth_terms, function(et) {
terms[grep(make_function_regexp(et), terms)]
grep(make_function_regexp(et), terms, value = TRUE)
})))
return(smooth)
}
Expand Down

0 comments on commit f1c661c

Please sign in to comment.