Re: [R] running R in batch with stdin input

From: Adaikalavan Ramasamy <ramasamy_at_cancer.org.uk>
Date: Fri 16 Jun 2006 - 10:45:42 EST

?commandArgs

On Thu, 2006-06-15 at 16:05 -0700, Eric Hu wrote:
> Hi I have a R script that needs to run a few times for different
> systems. I use R --no-save < r.script for one system. I am trying with
> no luck to use R CMD BATCH to introduce an stdin input variable for
> the script. I wonder if anyone can provide the correct usage to put
> the variable in the command like R CMD BATCH r.script name_variable.
>
> Thanks.
>
> -Eric
>
> In the r.script I have
>
> name <- readline("/dev/stdin")
> r0 <- read.table("/usr/local/surface/$name/$name_c_r")
> ...
>
> I want to get at the end:
>
> name <- "1BRS"
> r0 <- read.table("/usr/local/surface/1BRS/1BRS_c_r")
> ...
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 16 12:04:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 16 Jun 2006 - 18:12:20 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.