[R] dos command line

Hartley, Stacey A Stacey.Hartley at pnl.gov
Mon Jan 7 17:39:53 CET 2002


You can, indeed, do this.  My coworker showed me how.  Rename the filename you
want to run from the dos command line to ".Rprofile" and voila, you may type
Rterm .Rprofile at the command line and the file will run.  Actually, you only
need to type Rterm at the command line, as it will automatically source in
.Rprofile. The only requirement is to be in the same directory.  Obviously, be
careful in the future to keep directories separate if you don't want that
particular file running automatically every time you call R.

Hope this helps others out there!

Stacey 

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: Wednesday, January 02, 2002 1:57 PM
To: Hartley, Stacey A
Cc: 'r-help at stat.math.ethz.ch'
Subject: Re: [R] dos command line


There is no port of R to DOS, and R does not run from the DOS command
line.  It does run from the Windows command prompt, and there I think you
are looking for Rterm --no-save < filename.

Looking in the rw-FAQ would have saved your sanity: it's in Q2.7.

You can also do this sort of thing in other shells, e.g. tcsh and bash
under Windows.

On Wed, 2 Jan 2002, Hartley, Stacey A wrote:

> I am an Splus user trying to use R for a specific project where the client
> needs the programs to be run in R.  Before the holidays, I figured out how
> to run an R file from the dos command line--it worked great!  The command is
> "Rterm something filename".  I can't remember what it is now, and it is
> driving me nuts. Anyone know? I know I'll feel pretty stupid once the answer
> is given...I am running R.1.4.0 pre-release on my PC.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list