[R] function for running MS-DOS from R

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu May 20 18:47:36 CEST 2004


Gabor Grothendieck wrote:
> bang jeong sook <quietroom78 <at> hotmail.com> writes:
> 
> 
>>I had downloaded the program that runs on MS-DOS.
>>Is it possible for MS-DOS to be run in R such as WinBugs1.4?
>>I wonder whether there is the R function for running MS-DOS from R.
> 
> 
> On my XP system this works:
> 
> R> system("cmd")
> 
> to drop into the Windows command line and exit at the
> Windows command line get you back.  
> 
> One can slso do this:
> 
> R> system("cmd /c dir > listing.txt")
> R> listing <- readLines("listing.txt")
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Or shell(), which is the more user-friendly wrapper for system() under 
Windows.


Uwe Ligges




More information about the R-help mailing list