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:
] 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
: 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
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;
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
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
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
.. 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
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
9 matches
Mail list logo