[R] R BATCH script & reading command line options ? la argc() & argv()

Dirk Eddelbuettel edd at debian.org
Sun Feb 24 20:40:50 CET 2002


On Sun, Feb 24, 2002 at 06:53:28PM +0100, Rik Bradt wrote:
> I'm writing a R BATCH script on linux that connects to a MS-sqlserver to 
> fetch its data (=cross-platform).
> After the processing in R it does updates in the MS-sqlserver.

It appears to be possible to use ODBC proxies to get from Linux to MS-SQL on
a Windows box, but this is somewhat complicated.

Why don't you install R on Windows and then use RODBC to access it?

> I want to be able to pass parameters to the R BATCH script to control which 
> data it has to process.
> Is is possible to read the command line parameters passed to R in a BATCH 
> script?

Sort of. This gets discusses on the list every once in a while, please do
search the archive.

> I've found the function commandArgs( ), but this doesn't do the job...
> Is there a possibility to use c-style argc( ) and argv( ) functions?

Not directly.

Dirk


-- 
Good judgement comes from experience; experience comes from bad judgement. 
							    -- Fred Brooks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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