On 25/08/2019 12:08 a.m., Cyclic Group Z_1 via R-devel wrote:
In R scripts (as opposed to packages), even in reproducible scripts, it seems
fairly conventional to use the global workspace as a sort of main function, and
thus R scripts often populate the global environment with many variables, w
This seems like a nice idiom; I've seen others use if(!interactive()){
main() }to a similar effect.
Best,CG
On Sunday, August 25, 2019, 01:16:06 AM CDT, Gábor Csárdi
wrote:
This is what I usually put in scripts:
if (is.null(sys.calls())) {
main()
}
This is mostly equiv
This is a fair point; structuring functions into packages is probably
ultimately the gold standard for code organization in R. However, lexical
scoping in R is really not much different than in other languages, such as
Python, in which use of main functions and defining other named functions
On 25/08/2019 7:09 p.m., Cyclic Group Z_1 wrote:
This is a fair point; structuring functions into packages is probably
ultimately the gold standard for code organization in R. However, lexical
scoping in R is really not much different than in other languages, such as
Python, in which use of