RE: [R] R bash script

2005-02-19 Thread Ted Harding
On 18-Feb-05 Christian Schulz wrote: how is it possible to use more than one command when i'm didn't want use R CMD BATCH for specific reason? $ echo (x-1:10) | R --vanilla works $ echo (x-1:10 ;y-20:30 ;lm(y ~ x)) | R --vanilla works not. Two things wrong with the above: 1. Use

[R] R bash script

2005-02-18 Thread Christian Schulz
Hi how is it possible to use more than one command when i'm didn't want use R CMD BATCH for specific reason? $ echo (x-1:10) | R --vanilla works $ echo (x-1:10 ;y-20:30 ;lm(y ~ x)) | R --vanilla works not. Is it further possible using bash variables like $i from a loop in the bash echo call

Re: [R] R bash script

2005-02-18 Thread Romain Francois
Le 18.02.2005 22:52, Christian Schulz a écrit : Hi how is it possible to use more than one command when i'm didn't want use R CMD BATCH for specific reason? $ echo (x-1:10) | R --vanilla works $ echo (x-1:10 ;y-20:30 ;lm(y ~ x)) | R --vanilla works not. The following works for me: echo x-1:10

Re: [R] R bash script

2005-02-18 Thread Peter Dalgaard
Christian Schulz [EMAIL PROTECTED] writes: Hi how is it possible to use more than one command when i'm didn't want use R CMD BATCH for specific reason? $ echo (x-1:10) | R --vanilla works $ echo (x-1:10 ;y-20:30 ;lm(y ~ x)) | R --vanilla works not. It would probably help to use

Re: [R] R bash script

2005-02-18 Thread Pierre Kleiber
One way to run multiple R commands within a bash script is with a here document. See http://www.tldp.org/LDP/abs/html/here-docs.html Here is an excerpt of a bash script showing its use -- notice that several bash variables are referenced within it: #!/bin/bash . . R

Re: [R] R bash script

2005-02-18 Thread Christian Schulz
echo x-1:10 ;y-21:30 ;lm(y ~ x) | R --vanilla ..uups counting is sometimes difficult, or to late :-( , but many thanks for this link and example. regards, christian Pierre Kleiber wrote: One way to run multiple R commands within a bash script is with a here document. See