[R] "source" command inside R package scripts

Enrico Bibbona enrico.bibbona at unito.it
Tue Oct 21 13:24:42 CEST 2014


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
like

source("./R/sub/script.R")

that does not give me any error, but I know that the script (which
actuallly defines a few functions is not run. What is wrong? What can I do
better?
Thanks, Enrico

-- 
Enrico Bibbona
Dipartimento di Matematica
Università di Torino
https://sites.google.com/site/enricobibbona/

	[[alternative HTML version deleted]]



More information about the R-help mailing list