Re: [R] how can one break or stop or return from a script?

2009-11-17 Thread Stu
Thanks ... It's good to know I'm not missing the obvious. - Stu On Nov 16, 8:31 pm, Don MacQueen m...@llnl.gov wrote: I don't know how to do this in the way you describe. Easy alternatives include:   - putting the part of the script that is to be executed conditionally into a separate file,

[R] how can one break or stop or return from a script?

2009-11-16 Thread Stu
Hi, I am using a script to initialize variables in the global workspace. Based on some condition, I would like to stop evaluation of a script sourced on the command-line, without issuing an error. My current solution is the following hack that uses a repeat { } statement --- init.R

Re: [R] how can one break or stop or return from a script?

2009-11-16 Thread Don MacQueen
I don't know how to do this in the way you describe. Easy alternatives include: - putting the part of the script that is to be executed conditionally into a separate file, and then source it or not based on some condition. - simply wrapping the different parts of the script in if, then,