Re: [R] How to load functions in R

2008-09-11 Thread Henrik Bengtsson
Source() however loads only the last >>> function. with save(a,b,file="path") i can save more than 1 function. Thanks >>> a lot, >>> >>> Mihai >>> -Ursprüngliche Nachricht- >>> Von: Yihui Xie [mailto:[EMAIL PROTECTED] Gesende

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 Adam D. I. Kramer
s a lot, Mihai -Ursprüngliche 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 e

Re: [R] How to load functions in R

2008-09-11 Thread Adaikalavan Ramasamy
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()" or "edit()" them when we need to make any modifications. A trivial advantage of sa

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

Re: [R] How to load functions in R

2008-09-11 Thread Mihai.Mirauta
8 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()" or "edit()" them when we need to make any modifications. A trivial advantage of s

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 automatical

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 b

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 >

Re: [R] How to load functions in R

2008-09-11 Thread bartjoosen
Take a look at ?source Mihai.Mirauta wrote: > > > 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 curr

[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: f1=e