Matt,

patopatasfrias wrote:

> Hey, I'm a real novice...  how do I go about saving a function that I created 
> eg. If I created this function: Fun<-function(x1,X2) {......}, how can I
> store it so that the next time I use R I can load it and not have to type it
> out again????

If you search the list archives, you may find a solution to
this that I posted several months ago.  It involves moving
one's own functions to a dedicated directory, saving them in
an R workspace in that directory, and then loading that
workspace in the .Rprofile file.  

My method is a LOT simpler than making an R package but it is
more complex than saving the functions with dput or otherwise
in a file to be reloaded.  Its advantage is that (like making
a package) it makes the functions available to you even when
you open R in a different directory.

HTH

Mike Prager
Southeast Fisheries Science Center, NOAA
Beaufort, North Carolina  USA

______________________________________________
[email protected] 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.

Reply via email to