Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Running System Commands

You can ask the operating system to perform a command with the system command:

> system("sleep 10")		 # Run OS command sleep with argument 10
> system("sleep 10", wait=FALSE) # Run OS command but don't wait (MS/Windows)
> system("sleep 10 &")           # Run OS command but don't wait (GNU/Linux)
> l <- system("ls", intern=TRUE) # Run OS command and collect output



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.