This depends partly on what operating system you are using (the posting guide suggests including this type of information).
But basically shell will pass a command to the operating system (or a shell for unix Oss) for it to run the command. So in your example it is expecting to run dir/b on a file in the OS, not R. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of l.chhay > Sent: Wednesday, January 12, 2011 5:18 PM > To: r-help@r-project.org > Subject: [R] What does the shell() command do? > > > Dear R community, > > I am trying to understand what the shell() function does. > > An example is: > > xfile <- shell(paste("dir/b ", > paste(directory.folder,"file.name",sep="")),intern=T) > > I'm afraid I wasn't able to completely understand the explanation under > the > Help files. > > Thanks for your help! > > Leanne. > -- > View this message in context: http://r.789695.n4.nabble.com/What-does- > the-shell-command-do-tp3215032p3215032.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.