[BioC] silly question about writing own function

Ido M. Tamir tamir at imp.univie.ac.at
Wed Feb 28 18:40:32 CET 2007


On Wednesday 28 February 2007 17:38, James Anderson wrote:
> Hi,
>
> I have a rather simple question for writing my own function. Suppose I
> wrote a script "A" which called function B written by myself. Seems that I
> need to write the function B within the script A. Is there anyway to write
> B as a separate script (so that we have A and B two scripts within the same
> directory). I tried to do this but it seems that I must write function B
> within script A for them to work. I am very familiar with matlab, but new
> to R. I wonder how to do this, thanks.

?source

in "A.R":

source("B.R") 

where "B.R"  is your script file in the same directory as "A.R".

HTH ido

> James

>
> ---------------------------------
> Be a PS3 game guru.
Please send me one.



More information about the Bioconductor mailing list