[R] can I call user-created functions without source() ?

Rob Campbell rob at robertcampbell.co.uk
Mon Jun 19 11:36:25 CEST 2006


Hi,

I have to R fairly recently from Matlab, where I have been used to
organising my own custom functions into directories which are adding to
the Matlab search path. This enables me to call them as I would one of
Matlab's built-in functions. I have not found a way of doing the same
thing in R. I have resorted to using source() on symlinks located in the
current directory. Not very satisfactory.

I looked at the R homepage and considered making a "package" of my
commonly used functions so that I can call them in one go:
library(myFuncions, lib.loc="/path/to/library") Perhaps this is the only
solution but the docs on the web make the process seem rather
complicated--I only have a few script files I want to call! Surely
there's a straightforward solution?

How have other people solved this problem? Perhaps someone has a simple
"package skeleton" into which I can drop my scripts?


Thanks,

Rob



-- 
  Rob Campbell   -   Research Student
 Autistic Bacteriophage Research Group
 www.autisticBacteriophage.notlong.com

               Oxford

      www.robertcampbell.co.uk



More information about the R-help mailing list