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

From: Duncan Murdoch <>
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


to attach them. See Writing R Extensions for instructions.

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

Duncan Murdoch mailing list PLEASE do read the posting guide 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 Please read the posting guide before posting to the list.

list of date sections of archive