Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread Duncan Murdoch
On 26/08/2019 1:58 p.m., William Dunlap wrote: Duncan Murdoch wrote: > Scripts are for throwaways, not for anything worth keeping. I totally agree and have a tangentially relevant question about the <<- operator.  Currently 'name <<- value' means to look up the environment stack until you fin

Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread William Dunlap via R-devel
Duncan Murdoch wrote: > Scripts are for throwaways, not for anything worth keeping. I totally agree and have a tangentially relevant question about the <<- operator. Currently 'name <<- value' means to look up the environment stack until you find 'name' and (a) if you find 'name' in some frame

Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread Cyclic Group Z_1 via R-devel
Right, I did not mean to imply these tests are equivalent. Only that both similarly exclude execution of main() under some context.  Best, CG __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] wrap_logical warning message when loading objects created in R 3.6 in an R 3.5 session

2019-08-26 Thread Duncan Murdoch
On 23/08/2019 4:22 p.m., petr smirnov wrote: Hi, I am experiencing a warning message when I load a large R object created in an R 3.6 session in R 3.5.* , as follows: ``` Warning message: In load(“GDSCv2.RData”) : cannot unserialize ALTVEC object of class ‘wrap_logical’ from package ‘base’; r

[Rd] wrap_logical warning message when loading objects created in R 3.6 in an R 3.5 session

2019-08-26 Thread petr smirnov
Hi, I am experiencing a warning message when I load a large R object created in an R 3.6 session in R 3.5.* , as follows: ``` Warning message: In load(“GDSCv2.RData”) : cannot unserialize ALTVEC object of class ‘wrap_logical’ from package ‘base’; returning length zero vector ``` Of relevant info

Re: [Rd] Conventions: Use of globals and main functions

2019-08-26 Thread Gábor Csárdi
That is unfortunately wrong, though. Whether the script runs as "main" and whether R is in interactive mode are independent properties. I guess most of the time it works, because _usually_ you run the whole script (main()) in non-interactive mode, and source() it in interactive mode, but this is no