[R] run R under unix
Andrew Robinson
andrewr at uidaho.edu
Thu Oct 9 16:17:41 CEST 2003
Your Unix computer may also have "screen" installed. This is a multiplexing
terminal that allows you to place tasks in the background, log out of them,
log back into them on different machines, maintain multiple command prompts,
etc., all with minimal overhead - ideal for modems.
E.g. the following steps:
login
screen
R
source("mycode.R")
<start simulation>
Ctrl-a d
(screen is now detached; process is running in background)
exit
Then on a different machine
login
screen -r
(process is now running in foreground)
Ctrl-a d
(screen is now detached; process is running in background)
exit
You can create new screens, label them, obtain a menu, and use it to juggle
numerous tasks - such as editing a source file and executing it efficiently.
Refinements: use source("mycode.R", echo=T) for information about the status
of your simulation. You can also easily write snippets of code to have the
process email you when it's done, and run them via the "system" command.
Locate "cat" commands judiciously through your code to update you on its
progress.
Andrew
--
Andrew Robinson Ph: 208 885 7115
Department of Forest Resources Fa: 208 885 6226
University of Idaho E : andrewr at uidaho.edu
PO Box 441133 W : http://www.uidaho.edu/~andrewr
Moscow ID 83843 Or: http://www.biometrics.uidaho.edu
No statement above necessarily represents my employer's opinion.
More information about the R-help
mailing list