Re: [R] Reducing the size of a large script top speed onset of execution

2010-01-09 Thread Dennis Fisher
Professor Ripley, Thanks for your suggestions. I will look into the package approach. As far as the "source" speed issue, you suggested that the problem may relate to guessing encodings so I added: options(encoding="UTF-8") at the beginning of the code (was this the correct approach

Re: [R] Reducing the size of a large script top speed onset of execution

2010-01-09 Thread Prof Brian Ripley
Please just use make a package; then all the effort of parsing the code is done at install time, you can use lazy-loading Or if you are for some reason averse to that, source the code into an environment, save that and simply attach() its save file next time. Packages of that size load i

[R] Reducing the size of a large script top speed onset of execution

2010-01-09 Thread Dennis Fisher
Colleagues, (R 2.10 on all platforms) I have a lengthy script (18000 lines) that runs within a graphical interface. The script consists of 100's of function followed by a single command that calls these functions (execution depends on a number of environment variables passed to the script