[Rd] replicate evaluates its second argument in wrong environment

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Sat Feb 13 14:08:33 CET 2021

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.


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

More information about the R-devel mailing list