On Monday, February 15, 2021, David Winsemius
wrote:
>
> On 2/15/21 1:10 PM, Hadley Wickham wrote:
>
>> This is a nice example of the motivation for tidy evaluation — since
>> enquo() captures the environment in which the promise should be
>> evaluated, there's no need for an additional explicit
On 2/15/21 1:10 PM, Hadley Wickham wrote:
This is a nice example of the motivation for tidy evaluation — since
enquo() captures the environment in which the promise should be
evaluated, there's no need for an additional explicit argument.
library(rlang)
replicate2 <- function (n, expr, simpli
This is a nice example of the motivation for tidy evaluation — since
enquo() captures the environment in which the promise should be
evaluated, there's no need for an additional explicit argument.
library(rlang)
replicate2 <- function (n, expr, simplify = "array") {
exnr <- enquo(expr)
sapply
Currently replicate used within sapply within a function can fail
because it gets the environment for its second argument, which is
currently hard coded to be the parent frame, wrong. See this link for
a full example of how it goes wrong and how it could be made to work
if it were possible to pass