Revision 1b89ec86b6a914c4d45bee998d08eed1ef23f57f authored by Dominique Makowski on 20 July 2020, 08:30:03 UTC, committed by cran-robot on 20 July 2020, 08:30:03 UTC
1 parent d2eac42
utils_clean_emmeans_draws.R
#' @keywords internal
.clean_emmeans_draws <- function(x, ...) {
if (!requireNamespace("emmeans")) {
stop("Package 'emmeans' required for this function to work.\n",
"Please install it by running `install.packages('emmeans')`.")
}
if (!is.null(attributes(x)$misc$predict.type)){
x <- emmeans::regrid(x, transform = attributes(x)$misc$predict.type, ...)
}
draws <- emmeans::as.mcmc.emmGrid(
x,
names = FALSE,
sep.chains = FALSE,
NE.include = TRUE,
...
)
data.frame(draws, check.names = FALSE)
}
Computing file changes ...