[Rcpp-devel] Unit Test Question Was: pnorm/qnorm?

Michael Hannon jm_hannon at yahoo.com
Thu Sep 13 20:45:23 CEST 2012


Dirk Eddelbuettel <edd at debian.org> wrote:

>On 13 September 2012 at 09:48, Tim Triche, Jr. wrote:
>| Likewise, are there ever good reasons to use '<<-' or could that stand to
>| be retired too?
>
> Different discussion -- this is about the merits (or lack thereof) of global
> variables.
>
>
> We are getting rather off-topic now discussing R assignments and IDEs etc. 

I agree that this is off-topic, but I wanted to make one final remark.  I.e.,
the assignment operator "<<-" is NOT used solely for global variables.  I
think of it as an assignment in the enclosing environment, and it can safely
and reasonably be used in closures.  E.g.:

    http://www.lemnica.com/esotericR/Introducing-Closures/

-- Mike


More information about the Rcpp-devel mailing list