[R] DOS command using "system"

From: Taka Matzmoto <sell_mirage_ne_at_hotmail.com>
Date: Fri 27 Jan 2006 - 05:35:27 EST


HI R users
I have one question for using DOS command through "system" I like to delete a file that is located at C:\Program Files\DOSPROGRAM\input.dat
I can use a DOS command "del" on Dos prompt like this

C:\Documents and Settings> del "C:\Program Files\DOSPROGRAM\input.dat"

to delete input.dat file.

When I try to do the same thing on R using "system" command

system('del "C:\Program Files\DOSPROGRAM\input.dat"') or
system("del "C:\Program Files\DOSPROGRAM\input.dat"") or
system(paste("del", "\"C:\\Program Files\\DOSPROGRAM\\input.dat\"",sep=" "))

All the three system commands did work

Could you help me to figure out ?

Thanks in advance

TM



R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 27 05:45:26 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:12 EST