Rather than typing in one line at a time, you may wish to prepare a list of commands and execute them all at once. This approach is preferable when you have a series of rote instructions, for instance for a simulation. It is not useful for exploratory analyses or anything else requiring interaction.
To run S-PLUS in batch mode, put all your commands in a file
(note: end the file with several blank lines, or S-PLUS may not
execute the final command correctly). Instead of plain Splus
,
run:
Splus BATCH yourfile outputfile
This takes the commands in yourfile
and runs them through S-PLUS, storing the results in outputfile
.
For large tasks, you will want to do this in the background, by
putting an ampersand &
at the end of the call:
Splus BATCH yourfile outputfile &