[R] Saving a function
Petr Pikal
petr.pikal at precheza.cz
Tue Oct 31 08:40:45 CET 2006
Hi
1. You can create your own package (set of functions) and load it
each time you start R
2. When quitting R you can save workspace. It will create a file
named .Rdata in which your function is defined. Then you can load
this workspace and use your function
3. You can use some of dput, dget, source, save, load to write your
function to a file and get it back to your R session
4. You can consult manuals and help pages (R-intro, R-exts) or go
through some texts available on CRAN to learn how exactly to do such
things.
HTH
Petr
On 30 Oct 2006 at 18:26, patopatasfrias wrote:
Date sent: Mon, 30 Oct 2006 18:26:51 -0800 (PST)
From: patopatasfrias <mattinusa at gmail.com>
To: r-help at stat.math.ethz.ch
Subject: [R] Saving a function
>
> 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????
>
> Cheers
> Matt
> --
> View this message in context:
> http://www.nabble.com/Saving-a-function-tf2543540.html#a7087217 Sent
> from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
Petr Pikal
petr.pikal at precheza.cz
More information about the R-help
mailing list