[R] "#!/usr/bin/R"
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Mon May 10 18:52:23 CEST 2004
"Liaw, Andy" <andy_liaw at merck.com> writes:
> Someone had modified the R source to handle this, but it has not been
> incorporated into the official R source, if I'm not mistaken. Search the
> R-devel archive.
You can do stuff like this though:
>cat test.R
#!/bin/sh
tail +3 "$0" | R --vanilla --args $@ ; exit $?
x <- 2+2
x
ls()
print(x)
commandArgs()
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list