[R] Saving functions
jholtman at gmail.com
Mon Sep 8 16:53:16 CEST 2008
You can 'source' it in to define it and then call it as usual. No
particular directory since you have control of that with the 'source'
function. File extension is by convention and anyone will work since
source is just going to read in an text file and execute it.
On Mon, Sep 8, 2008 at 10:46 AM, Williams, Robin
<robin.williams at metoffice.gov.uk> wrote:
> Appologies for the simple nature of this question, I am unable to find
> the answer in manuals (EG and introduciton to R).
> I have written a function in a text editor and saved it with an .R
> extension. It is saved in my working directory. How can I run it, do I
> need to use source? If so, how do I supply the arguments to the
> function? Or does it need to be saved in a particular directory?
> Do I need a different file extension?
> Many thanks for any help.
> Robin Williams
> Met Office summer intern - Health Forecasting
> robin.williams at metoffice.gov.uk
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
+1 513 646 9390
What is the problem that you are trying to solve?
More information about the R-help