I am using R on unix. While in R how do I execute the unix shell commands? Is there a way to do it? I am executing a function in R and the matrix resulting from the function has to be passed on as an input to unix command. Any directions will be helpful. Thanks, Suman [[alternative HTML version deleted]]
Le mercredi 08 juillet 2009 ? 16:36 -0400, suman Duvvuru a ?crit :> I am using R on unix. While in R how do I execute the unix shell commands? > Is there a way to do it? I am executing a function in R and the matrix > resulting from the function has to be passed on as an input to unix command. > > > Any directions will be helpful.?system ?capture ?textConnection These three functions (I'm not sure bout the real name of the second) should allow you to get the standard output of a Unix command line. Consider also cpturing your command output in a file (reusable...). HTH, Emmanuel Charpentier
?system ?shQuote On Wed, Jul 8, 2009 at 4:36 PM, suman Duvvuru<duvvuru.suman at gmail.com> wrote:> I am using R on unix. While in R how do I execute the unix shell commands? > Is there a way to do it? I am executing a function in R and the matrix > resulting from the function has to be passed on as an input to unix command. > > > Any directions will be helpful. > > Thanks, > Suman > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
?system On Wed, Jul 8, 2009 at 4:36 PM, suman Duvvuru<duvvuru.suman at gmail.com> wrote:> I am using R on unix. While in R how do I execute the unix shell commands? > Is there a way to do it? I am executing a function in R and the matrix > resulting from the function has to be passed on as an input to unix command. > > > Any directions will be helpful. > > Thanks, > Suman > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >