[R] easiest way to integrate own functions on startup

stephen sefick ssefick at gmail.com
Tue Jan 20 02:11:14 CET 2009


?.Rprofile

On Mon, Jan 19, 2009 at 8:03 PM, Jörg Groß <joerg at licht-malerei.de> wrote:
> Is there a way to execute this command on every R-start?
>
>
> I tried to add something in the Startup.h file - but that didn't work.
>
> (working on a mac)
>
>
>
>
> Thanks!
>
> Am 20.01.2009 um 01:25 schrieb Duncan Murdoch:
>
>> On 19/01/2009 7:13 PM, Jörg Groß wrote:
>>>
>>> Hi,
>>> I am currently writing some own functions that I frequently need.
>>> So, it would be perfect if I could load these functions at the  beginning
>>> of each R-session with a small command.
>>> I tried to generate a R-package and install it that way.
>>> But it seems that it is not so easy to add new functions to an  existing
>>> R-package.
>>> So I am not so flexible by that.
>>> Is there a way to just load an .R-file which contains the function-
>>> definitions with a small command?
>>> So that the functions are useable in the current session?
>>> I tried load() but I get an error message...
>>
>> load() loads a binary image that was saved by save().  You probably want
>> source(), which reads and executes a file of R source.
>>
>> 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.
>



-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis




More information about the R-help mailing list