diff --git a/DESCRIPTION b/DESCRIPTION index 43cfc1f..ddacd41 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: emmeans Type: Package Title: Estimated Marginal Means, aka Least-Squares Means Version: 1.10.6-090003 -Date: 2025-01-08 +Date: 2025-01-16 Authors@R: c(person("Russell V.", "Lenth", role = c("aut", "cre", "cph"), email = "russell-lenth@uiowa.edu"), person("Balazs", "Banfai", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index c535ab0..ace59d9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,7 @@ title: "NEWS for the emmeans package" would be obtained when `B` is not regarded as a counterfactual. * Tweaks to `regrid()` to create `@post.beta` slot correctly when there are non-estimable cases. + * Bug fix for scoping in `subset.emmGrid()` (#518) ## emmeans 1.10.6 diff --git a/R/rbind.R b/R/rbind.R index 98d53ae..0173415 100644 --- a/R/rbind.R +++ b/R/rbind.R @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2012-2024 Russell V. Lenth # +# Copyright (c) 2012-2025 Russell V. Lenth # # # # This file is part of the emmeans package for R (*emmeans*) # # # @@ -163,7 +163,7 @@ rbind.emmGrid = function(..., deparse.level = 1, adjust = "bonferroni") { #' subset(warp.rg, wool == "A") ## or warp.rg |> subset(wool == "A") #' subset.emmGrid = function(x, subset, ...) { - sel = eval(substitute(subset), envir = x@grid) + sel = eval(substitute(subset), envir = x@grid, enclos = parent.frame()) x[sel, ...] }