From ggrothend|eck @end|ng |rom gm@||@com  Sat Feb 13 14:08:33 2021
From: ggrothend|eck @end|ng |rom gm@||@com (Gabor Grothendieck)
Date: Sat, 13 Feb 2021 08:08:33 -0500
Subject: [Rd] replicate evaluates its second argument in wrong environment
Message-ID: <CAP01uRm4Px6T7rMK3+Mho9S1Sv3aVmteM4gjDS19_14yPZtG6A@mail.gmail.com>

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 an envir argument to it.

https://stackoverflow.com/questions/66184446/sapplya-replicate-b-expression-no-longer-works-inside-a-function/66185079#66185079

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



[Rd] replicate evaluates its second argument in wrong environment
Gabor Grothendieck