[R] invoking user-defined function

Kinoko andzsinszan at gmail.com
Tue Nov 25 10:00:11 CET 2008


Philipp,

thanks for the tip.

source("path-to-my-script")

did the trick.




On Nov 25, 5:25 pm, Philipp Pagel <p.pa... at wzw.tum.de> wrote:
> On Mon, Nov 24, 2008 at 11:35:37PM -0800, Kinoko wrote:
> > Can somebody tell me how to invoke user-defined functions from script
> > files during run-time?
> > Basically I have (almost) one function per script file.
>
> > I am thinking of something like
>
> > #include   in C++
> > import      in Java/Python
> > use          in Perl
>
> As you already pointed out that you do not wish to build a
> pacakge, the most simple way is to use source() to read the
> function definition.
>
> cu
>         Philipp
>
> --
> Dr. Philipp Pagel
> Lehrstuhl für Genomorientierte Bioinformatik
> Technische Universität München
> Wissenschaftszentrum Weihenstephan
> 85350 Freising, Germanyhttp://mips.gsf.de/staff/pagel
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list