From f1c661c129f328c6cee035180be400799ac3d43b Mon Sep 17 00:00:00 2001 From: fweber144 Date: Mon, 6 Mar 2023 08:47:37 +0100 Subject: [PATCH] Minor readability and efficiency improvement. --- R/formula.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/formula.R b/R/formula.R index b38318bbd..3e4cafa13 100644 --- a/R/formula.R +++ b/R/formula.R @@ -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) }