Re: [R] Saving/loading custom R scripts

2010-09-13 Thread DrCJones
I'm still relatively new to R, so I tried the first of you two solutions: .First - function(){ source(Friedman-Test-with-Post-Hoc.r.txt) } Thanks very much for that, it works perfectly Cheers -- View this message in context:

Re: [R] Saving/loading custom R scripts

2010-09-09 Thread Bos, Roger
] Saving/loading custom R scripts Hi, Just create a file called .Rprofile that is located in your working directory (this means you could actually have different ones in each working directory). In that file, you can put in code just like any other code that would be source()d in. For instance, all

Re: [R] Saving/loading custom R scripts

2010-09-09 Thread Joshua Wiley
: Wednesday, September 08, 2010 11:20 AM To: DrCJones Cc: r-help@r-project.org Subject: Re: [R] Saving/loading custom R scripts Hi, Just create a file called .Rprofile that is located in your working directory (this means you could actually have different ones in each working directory

Re: [R] Saving/loading custom R scripts

2010-09-09 Thread Jakson A. Aquino
On Thu, Sep 9, 2010 at 1:14 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: On Thu, Sep 9, 2010 at 7:05 AM, Bos, Roger roger@rothschild.com wrote: Josh, I liked your idea of setting the repo in the .Rprofile file, so I tried it: r - getOption(repos) r[CRAN] - http://cran.stat.ucla.edu;

Re: [R] Saving/loading custom R scripts

2010-09-09 Thread Joshua Wiley
On Thu, Sep 9, 2010 at 9:28 AM, Jakson A. Aquino jaksonaqu...@gmail.com wrote: On Thu, Sep 9, 2010 at 1:14 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: On Thu, Sep 9, 2010 at 7:05 AM, Bos, Roger roger@rothschild.com wrote: Josh, I liked your idea of setting the repo in the .Rprofile

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Abhijit Dasgupta, PhD
You can create a .First function in your .Rprofile file (which will be in ~/.Rprofile). For example .First - function(){ source(Friedman-Test-with-Post-Hoc.r.txt) } You can also create your own package (mylibrary) down the line (see the R manual for creating extensions at

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Joshua Wiley
Hi, Just create a file called .Rprofile that is located in your working directory (this means you could actually have different ones in each working directory). In that file, you can put in code just like any other code that would be source()d in. For instance, all my .Rprofile files start

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Bert Gunter
.. Not quite. ?Startup provides details, but note the comment about only the base package being loaded and the need to use somepackage::somefunction() or to explicitly first load a package whose functions are used in .Profile. Note also that .First could also be used instead of putting the code

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Peter Ehlers
One comment on the function: I see that it uses T/F instead of TRUE/FALSE in a number of places. You'll save yourself some headaches if you replace those 'T/F's. -Peter Ehlers On 2010-09-08 1:25, DrCJones wrote: Hi, How does R automatically load functions so that they are available from the