[R] Storing and managing custom R functions for re-use

Jim Lemon jim at bitwrit.com.au
Sun Jul 10 01:29:24 CEST 2011


On 07/09/2011 09:30 PM, Simon Chamaillé-Jammes wrote:
> Dear all,
>
> sorry if this is a bit on the sidetrack for R-help.
>
> As a regular R user I have developed quite a lot of custom R functions,
> to the point of not always remembering what I have already programmed,
> where the file is and so on.
> I was wondering what other people do in this regards. A basic file with
> all your functions, or a custom R package, or directly integrated into a
> profile file ??? I'm considering that a blog with tagged posts may be a
> good solution (and really good ones could join R-bloggers maybe).
>
> If someone is happy to share what (s)he considers good practice, thanks.

Hi Simon,
This may or may not be good practice, but once I worked out how to make 
packages (see any of the tutorials on this), I just made a little 
package for each group of functions. Three of them grew up to be 
packages on CRAN, so it worked well for me. I think having the functions 
segregated into packages with an easy to recognise theme like the 
<blatant advertisement> clinsig package </blatant advertisement>, helps 
to organize the work for later use.

Jim



More information about the R-help mailing list