[R] function call from another r file

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sat Nov 24 13:38:45 CET 2012


On Sat, Nov 24, 2012 at 12:26 PM, Suzen, Mehmet <msuzen at gmail.com> wrote:
> If you want to handle a generic case, best thing is to create an R
> package.

And better than best is to use devtools to save you a fiddly
edit/build/install cycle. You don't even have to think of it as a
package, its just a folder called R with your .R files in, and a
DESCRIPTION file (metadata is always a good thing), and your functions
get attached in a separate position so they don't clutter ls(), and
load_all() will load the just the ones you've edited. Magic.

 http://rpubs.com/geospacedman/lazydevtools

Easy peasy.

Barry




More information about the R-help mailing list