Re: [R] "source" command inside R package scripts

2014-10-21 Thread Hadley Wickham
Your source function will be called when the package is _built_, not when it's loaded/attached. There's almost certainly a better way to solve your problem than using source() inside a package Hadley On Tue, Oct 21, 2014 at 6:24 AM, Enrico Bibbona wrote: > I have built a new package. I would lik

[R] "source" command inside R package scripts

2014-10-21 Thread Enrico Bibbona
I have built a new package. I would like to put an R script (let us call it "script.R) into a subdirectory of the /pkg/R/ directory, called /pkg/R/sub/ and I would like that such code is run when the package is installed. My way of doing so was to put an R script into /pkg/R/ with source command l