[R] How to load functions in R

2008-09-11 Thread Mihai.Mirauta
Hello, I am trying to use self created functions in other scripts than the one where they are stored. For the moment I am using the following structure of commands to do that: 1. Load the text file with the functions in the current script: x=parse(path) 2. transform the tex in a function:

Re: [R] How to load functions in R

2008-09-11 Thread bartjoosen
in context: http://www.nabble.com/How-to-load-functions-in-R-tp19434909p19434944.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] How to load functions in R

2008-09-11 Thread Yihui Xie
Hi, you may save your functions somewhere on your disk using save() and load them next time when you want to use them. See ?save and ?load Yihui On Thu, Sep 11, 2008 at 9:30 PM, [EMAIL PROTECTED] wrote: Hello, I am trying to use self created functions in other scripts than the one where

Re: [R] How to load functions in R

2008-09-11 Thread Adaikalavan Ramasamy
I would recommend saving the functions into a separate file and then using source() as bartjoosen suggested. I do not recommend using save() here because the output is non-readable (even when using ascii=TRUE option). Which means that you have to load() it, then copy-and-paste into an editor

Re: [R] How to load functions in R

2008-09-11 Thread Yihui Xie
We may just read them in the R console instead of an external editor, and fix() or edit() them when we need to make any modifications. A trivial advantage of saving them as an image file in Windows is that you can double-click the file and R will be started with these objects loaded automatically.

Re: [R] How to load functions in R

2008-09-11 Thread Mihai.Mirauta
An: [EMAIL PROTECTED] Cc: Mirauta, Mihai; r-help@r-project.org Betreff: Re: [R] How to load functions in R We may just read them in the R console instead of an external editor, and fix() or edit() them when we need to make any modifications. A trivial advantage of saving them as an image file

Re: [R] How to load functions in R

2008-09-11 Thread Martin Maechler
YX == Yihui Xie [EMAIL PROTECTED] on Thu, 11 Sep 2008 22:47:47 +0800 writes: YX We may just read them in the R console instead of an external editor, YX and fix() or edit() them when we need to make any modifications. A YX trivial advantage of saving them as an image file in

Re: [R] How to load functions in R

2008-09-11 Thread Adaikalavan Ramasamy
An: [EMAIL PROTECTED] Cc: Mirauta, Mihai; r-help@r-project.org Betreff: Re: [R] How to load functions in R We may just read them in the R console instead of an external editor, and fix() or edit() them when we need to make any modifications. A trivial advantage of saving them as an image file in Windows

Re: [R] How to load functions in R

2008-09-11 Thread Adam D. I. Kramer
Nachricht- Von: Yihui Xie [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 11. September 2008 16:48 An: [EMAIL PROTECTED] Cc: Mirauta, Mihai; r-help@r-project.org Betreff: Re: [R] How to load functions in R We may just read them in the R console instead of an external editor, and fix

Re: [R] How to load functions in R

2008-09-11 Thread Rolf Turner
On 12/09/2008, at 2:53 AM, [EMAIL PROTECTED] wrote: Hello, It seems that all methods work. Source() however loads only the last function. This is absolute nonsense. You are doing something wrong and/or not understanding what you are doing. This is bad practice.

Re: [R] How to load functions in R

2008-09-11 Thread Henrik Bengtsson
-project.org Betreff: Re: [R] How to load functions in R We may just read them in the R console instead of an external editor, and fix() or edit() them when we need to make any modifications. A trivial advantage of saving them as an image file in Windows is that you can double-click the file