> 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
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