[R] Making R script to run in a console

Marc Schwartz (via MN) mschwartz at mn.rr.com
Mon Aug 14 22:58:20 CEST 2006


On Mon, 2006-08-14 at 14:12 -0300, Ronaldo Reis-Jr. wrote:
> Hi,
> 
> is possible to make a R script to run under a console without open the R 
> environment?
> 
> Something like this example.R
> 
> #!/usr/bin/R
> 
> function(name="Put here your name") {
> print(name)
> }
> 
> In a console I make
> ./example.R name="Ronaldo Reis Júnior"
> then program print my name.
> 
> It is possible?
> 
> Thanks
> Ronaldo

Ronaldo,

You might want to review these web pages:

http://wiki.r-project.org/rwiki/doku.php?id=developers:rinterp

http://kavaro.fi/mediawiki/index.php/Using_R_from_the_shell


HTH,

Marc Schwartz



More information about the R-help mailing list