A Few Useful Functions

S-PLUS stores every command you type in the file .Audit in your .Data directory. You can examine that file to review commands you have used to solve previous problems. You can also take advantage of this by typing again() to repeat the previous command. To repeat an old command, use the function history(). This function provides a list of the last ten commands, but by typing history(max=100) you can see the last 100 commands. On a UNIX machine, there is a better way to do this: run Splus -e instead of plain Splus (the -e means ``in emacs mode''). In emacs mode, S-PLUS allows you to retrieve previous commands by pressing control-P. Because of this handy feature, you may wish to alias Splus to Splus -e in your .cshrc file. However, if you want to run Splus in batch mode after doing this, be sure to alias Splus back to normal, as Splus -e BATCH in out will not produce any output (emacs mode and batch mode do not mix).



Pantelis Vlachos
1/15/1999