Re: [Rd] issues with environment handling in model.frame()

2020-05-02 Thread Berry, Charles
> On May 2, 2020, at 5:30 AM, Antoine Fabri wrote: > > Dear all, > > model.frame behaves in a way I don't expect when both its formula and > subset argument are passed through a function call. > See the help page ?formula in particular the section headed 'Environments'. Then look at the

[Rd] issues with environment handling in model.frame()

2020-05-02 Thread Antoine Fabri
Dear all, model.frame behaves in a way I don't expect when both its formula and subset argument are passed through a function call. This works as expected: model.frame(~wool, warpbreaks, breaks < 15) #>wool #> 14A #> 23A #> 29B #> 50B fun1 <- function(y) model.frame(~wool, wa