Re: [R] how to run system command

2012-03-08 Thread Keith Jewell
t report PATH's contents. You can > look at it with > strsplit(Sys.getenv("PATH"), .Platform$path.sep)[[1]] > > Bill Dunlap > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On >>

Re: [R] how to run system command

2012-03-07 Thread William Dunlap
r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Keith Jewell > Sent: Wednesday, March 07, 2012 1:02 AM > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] how to run system command > > Works for me: > -- > &g

Re: [R] how to run system command

2012-03-07 Thread Keith Jewell
Works for me: -- > sessionInfo() R version 2.14.1 (2011-12-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C

Re: [R] how to run system command

2012-03-06 Thread Henrik Bengtsson
[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

Re: [R] how to run system command

2012-03-06 Thread William Dunlap
nt: 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) : 'd

Re: [R] how to run system command

2012-03-06 Thread Sarah Goslee
On Tue, Mar 6, 2012 at 8:48 AM, sagarnikam123 wrote: > i used it on windows system, but giving error like > >> e <- system("date", intern=TRUE) > Error in system("date", intern = TRUE) : 'date' not found If you type date at a windows command line does it work? You can't use system() to run syste

Re: [R] how to run system command

2012-03-06 Thread sagarnikam123
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 archi

Re: [R] how to run system command

2012-03-06 Thread R. Michael Weylandt
Those are error messages from the shell, not "real values" for what you think you are doing. Are you looking for the getwd() and Sys.date() functions instead? Michael On Tue, Mar 6, 2012 at 6:56 AM, sagarnikam123 wrote: > i run like ,but it giving other than what i expect > i also want to captur

Re: [R] how to run system command

2012-03-06 Thread Sarah Goslee
Please read the help for system, paying particular attention to the intern argument. > e <- system("date", intern=TRUE) > e [1] "Tue Mar 6 08:33:48 EST 2012" Sarah On Tue, Mar 6, 2012 at 6:56 AM, sagarnikam123 wrote: > i run like ,but it giving other than what i expect > i also want to captur

[R] how to run system command

2012-03-06 Thread sagarnikam123
i run like ,but it giving other than what i expect i also want to capture output & print it > e<-system("date") > e [1] 127 > e<-system("dir") > e [1] 127 -- View this message in context: http://r.789695.n4.nabble.com/