[R] Unix commands on R

Emmanuel Charpentier emm.charpentier at free.fr
Wed Jul 8 22:53:00 CEST 2009


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




More information about the R-help mailing list