Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 30, 2023
1 parent aa2b966 commit 2200807
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ S3method(p_map,data.frame)
S3method(p_map,draws)
S3method(p_map,emmGrid)
S3method(p_map,emm_list)
S3method(p_map,get_predicted)
S3method(p_map,mcmc)
S3method(p_map,mcmc.list)
S3method(p_map,numeric)
Expand Down
5 changes: 5 additions & 0 deletions R/p_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ p_map.numeric <- function(x, null = 0, precision = 2^10, method = "kernel", ...)
}


#' @export
p_map.get_predicted <- function(x, null = 0, precision = 2^10, method = "kernel", ...) {
p_map(as.numeric(x), null = null, precision = precision, method = method, ...)
}


#' @export
p_map.data.frame <- function(x, null = 0, precision = 2^10, method = "kernel", ...) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-different_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_that("insight::get_predicted", {
expect_equal(c(nrow(rez), ncol(rez)), c(32, 2))

rez <- p_map(x)
expect_equal(c(nrow(rez), ncol(rez)), c(2, 2))
expect_equal(c(nrow(rez), ncol(rez)), c(1, 2))

rez <- p_significance(x)
expect_equal(c(nrow(rez), ncol(rez)), c(2, 2))
Expand Down

0 comments on commit 2200807

Please sign in to comment.