Re: [R] writing R shell scripts?

From: David L. Van Brunt, Ph.D. <>
Date: Wed 09 Nov 2005 - 01:43:58 EST

You can "cheat" by using the shell to write a small text file full of commands, then "source" that file by using R CMD BATCH yourtempfile.R . You can also write small text files with variables defined and values assigned, and pull them in from your script.

On 11/7/05, Mike Miller <> wrote:
> I'm new to the list. I've used R and S-PLUS a bit for about 15 years but
> am now working to make R my main program for all numerical and statistical
> computing. I also use Octave for this kind of work and I recommend it (it
> is also under the GPL). Here's my question: In Octave I can write shell
> scripts in the Linux/UNIX environment that begin with a line like this...
> #!/usr/local/bin/octave -q
> ...and the remaining lines are octave commands. Is it possible to do this
> sort of thing in R using something like this?:
> #!/usr/lib/R/bin/R.bin
> Well, that isn't quite it because I tried it and it didn't work!
> Any advice greatly appreciated. Thanks in advance.
> Mike
> --
> Michael B. Miller, Ph.D.
> Assistant Professor
> Division of Epidemiology and Community Health
> and Institute of Human Genetics
> University of Minnesota
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

David L. Van Brunt, Ph.D.

	[[alternative HTML version deleted]]

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Nov 09 02:34:18 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:04 EST