Re: [R] reusing custom functions, how to ?

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue, 15 Apr 2008 09:44:24 -0400

Ng Stanley wrote:
> Hi,
>
> I have created a number of custom functions, and hope to reuse them in other
> source files. How should I go about doing that ?
>
>
The best way is to create a package to hold them, then just use

library(MyPackage)

to attach them. See Writing R Extensions for instructions.

Another way is to use source('file.R') to read them in.

Duncan Murdoch



R-help_at_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. Received on Tue 15 Apr 2008 - 14:11:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Apr 2008 - 15:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive