[R] Include files?

Mark Knecht markknecht at gmail.com
Fri Jul 24 18:36:42 CEST 2009


Thanks. I think source is what I was looking for.

Cheers,
Mark

On Fri, Jul 24, 2009 at 9:30 AM, Erik Iverson<eiverson at nmdp.org> wrote:
> Several solutions, easiest might be to use the source function in your program.  Also, you could create a .Rprofile if you use them every time you use R.
>
> See ?source and ?Startup
>
> Erik
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Mark Knecht
> Sent: Friday, July 24, 2009 11:25 AM
> To: r-help
> Subject: [R] Include files?
>
> Hi,
>   I have 15 or 20 functions I've written to convert the sort of data
> I'm working with. They are currently in their own R file which I load
> by hand in Rgui before loading and running my main programs.
>
>   Is there any way to have this file included in my R program like
> #include might in C?
>
>   If not is there a simple newbie-type example of how to create a
> package so I could just say something like require(MWKFunctions) and
> be done with this?
>
> Thanks,
> Mark
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list