Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 13, 2024
1 parent 1d0c606 commit 4c86fcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 3 additions & 7 deletions R/get_datagrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,10 @@ get_datagrid.datagrid <- get_datagrid.visualisation_matrix
#' combinations of values are represented), except when a nesting structure is
#' detected. Additionally, when the input is an `emm_list` object, the function
#' will `rbind()` the data-grids of all the elements in the input.
#' \cr\cr
#'
#' For `{marginaleffects}` inputs, the output may very well be a non-grid
#' result. See examples.
#'
#'
#' @return A `data.frame` with key columns that identify the rows in `x`.
#'
#' @examples
Expand All @@ -673,7 +672,7 @@ get_datagrid.datagrid <- get_datagrid.visualisation_matrix
#' family = binomial("logit"),
#' data = mtcars)
#'
#' @examplesIf insight::check_if_installed("emmeans")
#' @examplesIf insight::check_if_installed("emmeans", quietly = TRUE)
#' em1 <- emmeans::emmeans(mod, ~ cyl + hp, at = list(hp = c(100, 150)))
#' get_datagrid(em1)
#'
Expand All @@ -683,7 +682,7 @@ get_datagrid.datagrid <- get_datagrid.visualisation_matrix
#' eml1 <- emmeans::emmeans(mod, pairwise ~ cyl | hp, at = list(hp = c(100, 150)))
#' get_datagrid(eml1) # not a "true" grid
#'
#' @examplesIf insight::check_if_installed("marginaleffects", minimum_version = "0.24.0.6")
#' @examplesIf insight::check_if_installed("marginaleffects", quietly = TRUE, minimum_version = "0.24.0.6")
#' mfx1 <- marginaleffects::slopes(mod, variables = "hp")
#' get_datagrid(mfx1) # not a "true" grid
#'
Expand All @@ -692,9 +691,6 @@ get_datagrid.datagrid <- get_datagrid.visualisation_matrix
#'
#' contr2 <- marginaleffects::avg_comparisons(mod)
#' get_datagrid(contr2) # not a "true" grid
#'
#'
#'
#' @export
get_datagrid.emmGrid <- function(x, ...) {
suppressWarnings({
Expand Down
8 changes: 3 additions & 5 deletions man/get_datagrid.emmGrid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c86fcb

Please sign in to comment.