Re: [Rd] Run script automatically when package is loaded

2011-03-12 Thread Dirk Eddelbuettel
On 12 March 2011 at 14:06, Janko Thyson wrote: | Dear list, | | is it possible to specify a script that is executed "automatically" when my | package is mounted via 'require(my.pkg)' or 'library(my.pkg)'? That has been possible all along. See help(".onLoad") if you use a NAMESPACE (as you should

[Rd] Run script automatically when package is loaded

2011-03-12 Thread Janko Thyson
Dear list, is it possible to specify a script that is executed "automatically" when my package is mounted via 'require(my.pkg)' or 'library(my.pkg)'? Id' like to specify execute a small init function that creates some crucial environment structures. As it's always the first thing to do when using