On Tue, Mar 6, 2012 at 11:49 AM, William Dunlap <wdun...@tibco.com> wrote: >> system("cmd.exe /c date /T", intern=TRUE) > [1] "Tue 03/06/2012 "
To avoid messing with "cmd.exe /c", you can use shell(), e.g. > res <- shell("date /T", intern=TRUE) > res [1] "Tue 03/06/2012 " > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > >> -----Original Message----- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On >> Behalf Of sagarnikam123 >> Sent: Tuesday, March 06, 2012 5:49 AM >> To: r-help@r-project.org >> Subject: Re: [R] how to run system command >> >> i used it on windows system, but giving error like >> >> > e <- system("date", intern=TRUE) >> Error in system("date", intern = TRUE) : 'date' not found >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/how-to-run-system-command- >> tp4449597p4449906.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> 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. > > ______________________________________________ > 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. ______________________________________________ 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.