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
<[EMAIL PROTECTED]> wrote:
> Hi,
>  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
> [EMAIL PROTECTED]
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

______________________________________________
R-help@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.

Reply via email to