[R] shelling out to R for one command

Dirk Eddelbuettel edd at debian.org
Sun Nov 17 05:08:49 CET 2002


On Sat, Nov 16, 2002 at 11:34:50PM -0400, Paul Meagher wrote:
> BTW, what do you think Roneliner would look like as a shell script?

"There's more than one way to do it". Here's just one:

edd at sonny:~> cat /tmp/R1
#!/bin/sh -e
echo "$@" | R --slave

edd at sonny:~> /tmp/R1 "print(3+4); qnorm(0.5)"
[1] 7
[1] 0

Dirk

-- 
Prediction is very difficult, especially about the future. 
				             -- Niels Bohr
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list