Skip to content

Commit

Permalink
Fix for downstream error in tern.gee
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlenth committed May 20, 2024
1 parent 24e0b0a commit e636921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: emmeans
Type: Package
Title: Estimated Marginal Means, aka Least-Squares Means
Version: 1.10.2
Date: 2024-05-18
Date: 2024-05-19
Authors@R: c(person("Russell V.", "Lenth", role = c("aut", "cre", "cph"),
email = "russell-lenth@uiowa.edu"),
person("Ben", "Bolker", role = "ctb"),
Expand Down
7 changes: 5 additions & 2 deletions R/emm-list.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,11 @@ rbind.emm_list = function(..., which, adjust = "bonferroni") {
#' @method rbind summary_emm
rbind.summary_emm = function(..., which) {
slobj = list(...)
if(!all(sapply(slobj, \(z) inherits(z, "summary_emm"))))
stop("All objects must inherit from 'summary_emm'")
if(!all(sapply(slobj, \(z) inherits(z, "data.frame")))) {
# workaround to make tern.gee::lsmeans() work
slobj = lapply(slobj, \(z) if(inherits(z, "data.frame")) data.frame(z) else z)
return(do.call("rbind", slobj))
}
rbind.summary_eml(slobj, which = which)
}

Expand Down

0 comments on commit e636921

Please sign in to comment.