[R] hiding/protecting utility functions in .Rprofile

Greg Snow Greg.Snow at imail.org
Mon Feb 1 19:30:37 CET 2010


Instead of putting the functions into .Rprofile, save them as a package or use save to put them in a .Rdata file.  Then in .Rprofile you can load the package or attach the .Rdata file.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Michael Friendly
> Sent: Monday, February 01, 2010 11:19 AM
> To: R-Help
> Subject: [R] hiding/protecting utility functions in .Rprofile
> 
> [Env: WinXp, R 2.9.2]
> In my .Rprofile, I define a number of utility functions I'd like to
> have
> available in my R session, but don't want them
> to be *normally* listed by ls(), or more importantly, saved if I save
> my
> session variables/functions.
> 
> How can I do this?
> 
> --
> Michael Friendly     Email: friendly AT yorku DOT ca
> Professor, Psychology Dept.
> York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
> 4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
> Toronto, ONT  M3J 1P3 CANADA
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list