Better to attach a new environment and source() the files into that.
local({
for (.x in dir("Mylibrary",full.names=T,recursive=T))
source(.x, local=T); rm(.x)},
env = attach(NULL, name="myenv"))for all the reasons why a package() is a good idea.
Leaving an object `x' around from .Rprofile is not at all a good idea, BTW.
On Wed, 6 Apr 2005, Josef Eschgfaeller wrote:
~/.Rprofile
You could also write in .Rprofile soemthing like this:
for (x in dir("Mylibrary",full.names=T,recursive=T)) source(x)
where "Mylibrary" is a directory which contains your functions without making a package.
Josef Eschgf�ller
-- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
