Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 23, 2025
1 parent 9a6a620 commit fc1e6e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/format.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ format.marginaleffects_contrasts <- function(x, model = NULL, p_adjust = NULL, c
dgrid <- attributes(x)$datagrid

# sanity check - method "get_marginalmeans()" calls "format.estimate_means()"
# for printint, and that method doesn't pass "comparison" - thus, we have to
# for printing, and that method doesn't pass "comparison" - thus, we have to
# extract it from the attributes
if (is.null(comparison)) {
comparison <- attributes(x)$comparison
Expand Down
5 changes: 5 additions & 0 deletions R/get_marginalcontrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ get_marginalcontrasts <- function(model,
}
}
}
# we want: "hypothesis" is the original argument provided by the user,
# can be a formula like ~pairwise, or a string like "pairwise". This is
# converted into the appropriate type depending on the marginaleffects
# version. "comparison" should always be a character string, for internal
# processing.
list(hypothesis = hypothesis, comparison = comparison)
}

Expand Down

0 comments on commit fc1e6e9

Please sign in to comment.