[R] calling self written R functions

Sarah Goslee sarah.goslee at gmail.com
Fri Nov 18 03:34:11 CET 2011


?source

source("/path/to/foo.R") will load it into R.

Sarah

On Thu, Nov 17, 2011 at 8:26 PM, Sachinthaka Abeywardana
<sachin.abeywardana at gmail.com> wrote:
> Hi All,
>
> I have written a function (say) called foo, saved in a file called
> foo.R. Just going by Matlab syntax I usually just change my folder path and
> therefore can call it at will.
>
> When it comes to R, how is the usual way of calling/loading it? because R
> doesnt seem to automatically find the function from a folder (which might
> be stupid to attempt in the first place).
>
> Thanks,
> Sachin
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list