Skip to content

Commit

Permalink
Update get_marginalcontrasts.R
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 22, 2025
1 parent 7475d82 commit 331071d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/get_marginalcontrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ get_marginalcontrasts <- function(model,
# "Species='setosa'". If `by` is also used for filtering, split and extract
# filter value for later - we have to filter rows manually after calculating
# contrasts (but only for `estimate = "average"`!). Furthermore, "clean" `by`
# argument (remove filter)
# argument (remove filter), because we need the pure variable name for setting
# up the hypothesis argument, where variables in `by` are used in the formula
if (!is.null(my_args$by) && any(grepl("=", my_args$by, fixed = TRUE))) { # "[^0-9A-Za-z\\._]"
# find which element in `by` has a filter
filter_index <- grep("=", my_args$by, fixed = TRUE)
Expand Down

0 comments on commit 331071d

Please sign in to comment.