Hi, I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... Does anybody knows how it works ? Is it a path problem ? Maybe the answer is simple: I am a R user under Unix/Linux and I don't know well R under windows. Thanks ! Aurelie
?dir.create mkdir is a built-in for 'cmd.exe' (think of it like shell built-ins in unix, vs. an actual command in $PATH) system('cmd.exe /c mkdir foo') works, but the R command: dir.create is what you really want. On Thu, Feb 5, 2009 at 14:17, Aurelie Labbe, Dr. <aurelie.labbe at mcgill.ca> wrote:> Hi, > > I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... > Does anybody knows how it works ? Is it a path problem ? Maybe the answer is simple: I am a R user under Unix/Linux and I don't know well R under windows. > > Thanks ! > Aurelie > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >
You could use shell indeed On Thu, Feb 5, 2009 at 6:17 PM, Aurelie Labbe, Dr. <aurelie.labbe@mcgill.ca>wrote:> Hi, > > I am trying to use the R command "system" under windows (XP). If I try the > simple command system("mkdir toto") to create a directory toto, it tells me > that it cannot find the command mkdir... > Does anybody knows how it works ? Is it a path problem ? Maybe the answer > is simple: I am a R user under Unix/Linux and I don't know well R under > windows. > > Thanks ! > Aurelie > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]