[R] 'require' equivalent for local functions

JiHO jo.lists at gmail.com
Mon Mar 23 15:55:06 CET 2009


Thanks very much to everyone. I think I will use a combination of both  
techniques.

On 2009-March-22  , at 20:08 , Duncan Murdoch wrote:

> That's pretty hard to make bulletproof.  Why not just put those  
> functions in a package, and use that package?


I know it will be impossible to make bullet proof and efficient at the  
same time. However, my functions are pretty specific to each project,  
have long names and do not collide with variable names (because I use  
dots in function names but camel case in variable names) so just  
looking for the name should be OK. Plus I have a simple keyboard  
shortcut in my text editor to source the current file in the currently  
R session, so it will be easy to re-source some files after I modify  
them.

On the other hand I have a bundle of general enough functions that I  
import in many projects (http://github.com/jiho/r-utils/ for those  
that might be interested in netCDF data handling, 2D arrow fields and  
ggplot2 stuff) and this one is a good candidate to be turned into a  
package.

So thanks again to everyone. Sincerely,

JiHO
---
http://jo.irisson.free.fr/




More information about the R-help mailing list