[R] R package: Where to put code to Run Once Only?

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Apr 6 21:32:09 CEST 2009



Dieter Menne wrote:
> Uwe Ligges <ligges <at> statistik.tu-dortmund.de> writes:
> 
>> That fine, in principle, convention is to have code in zzz.R, see 
>> Writing R Extzensions.
> 
> Finally I got it, zzz comes from Extzensions. In the fields I normally work in,
> zzz mean the LAST thing to do before going to sleep or to crash the system.

Dieter,

in fact the code in zzz.R is processed if zzz.R will be processed 
according to sorting in a C locale. But since all other code regularly 
consists of function definition or definition of methods and therelike, 
the ordering is irrelevant (and if your code to be processed dierectly 
depends on functions defined in your package, then it becomes relevant 
not to happen in the very beginning.

Best,
Uwe



> Dieter
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list