[R] How to read stored functions

2007-09-25 Thread Mauricio Malfert
Hi I'm simulating missing data patterns and I've started to get a lot of functions in the same .R file is it possible to store al these functions in a library like one does in C++ (i.e the .h file) and read the functions from the main .R file /Mauricio [[alternative HTML version

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
Mauricio Malfert wrote: Hi I'm simulating missing data patterns and I've started to get a lot of functions in the same .R file is it possible to store al these functions in a library like one does in C++ (i.e the .h file) and read the functions from the main .R file /Mauricio You

Re: [R] How to read stored functions

2007-09-25 Thread Jared O'Connell
Having your functions in a text file, say functions.r and then calling: source(functions.r) is also an option. This assumes you are in the same directory as functions.r. Perhaps take a look at ?setwd and ?getwd as well. On 9/25/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: Mauricio

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small. But, when you change any function body, you have to repeat that source() call in

Re: [R] How to read stored functions

2007-09-25 Thread Jared O'Connell
...and my R education (and embarassment) continues ;) On 9/25/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and

Re: [R] How to read stored functions

2007-09-25 Thread Mark Wardle
Jared: I agree with your advice - I use source() too! I think I work in a different way to many, and don't ever save current workspace but use the interactive R environment cutting and pasting code from documents held under version control. As long as one is careful, I don't think there is any

Re: [R] How to read stored functions

2007-09-25 Thread Duncan Murdoch
On 9/25/2007 4:15 AM, Vladimir Eremeev wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small. But, when you change any

Re: [R] How to read stored functions

2007-09-25 Thread Vladimir Eremeev
Duncan Murdoch-2 wrote: On 9/25/2007 4:15 AM, Vladimir Eremeev wrote: source'ing is a bad practice because this saves additional copies of functions and data in the local workspace. Wasting disk space is not a problem now since HDDs are cheap and function bodies are generally small.