Displaying 20 results from an estimated 10000 matches similar to: "passing args to R CMD BATCH in win 2000"
2008 Jan 11
2
communicate from Rterm
Please, help with announcing an error from Rterm:
I am calling R from an Excel VBA and noticed that if there is an error
nothing conspicuous happens. I would like just a popup window when R
cannot finish cleanly. The "ret " value returned from Shell is useless
in determining what happened.
Thank you all.
*****************************
Public Sub Repo()
ds = InputBox("Type in
2003 May 05
1
commandArgs()
Apologies for asking about this, but I don't quite understand how
this works after looking through the FAQ and the Help archives.
Let's say I want to pass "1000" as an argument to R. I did the
following:
>R CMD BATCH --1000 infile outfile
When I do print( commandArgs() ), I see
[1] ".../R.bin" "--restore"
[3] "--save"
2010 Mar 11
1
Append to outfile in R CMD BATCH mode
Is there a way to append to the outfile when using R CMD BATCH? My code, right now, is:
R CMD BATCH --slave --vanilla '--args place .2 -.1 .9 .6' StratificationSimulation example.output
Everything else is working the way I'd like it. The first few lines of code of my script file are:
options(echo=FALSE)
cmd_args = commandArgs()
print (cmd_args)
#d <-
2007 Apr 01
2
commandArgs usage and --args invokation
Dear R experts:
I am a bit stymied by how the argument picking-off works in R batch file usage.
$ cat commandArgs.R
cat(" Command Line Arguments were ", commandArgs(), "\n");
$ /usr/bin/R CMD BATCH commandArgs.R --args 1 2 3
$ /usr/bin/R --args 1 CMD BATCH commandArgs.R
... I am now getting into interactive mode ?! I guess it really is skipping the
rest of the command line
2012 May 22
2
Best way to locate R executable from within R?
Hi,
I'd like to spawn of a new R process from within R using system(),
e.g. system("R -f myScript.R"). However, just specifying "R" as in
that example is not guaranteed to work, because "R" may not be on the
OS's search path.
What is the best way, from within a running R, to infer the command
(basename or full path) for launching R in way that it works on
2000 Aug 12
1
Batch Execution of R
R Team:
This is most likely a trivial question, but after searching docs for
several weeks and digging through Rweb and RCGI, I could not clearly
identify the method to call an R method from Linux or Win32 systems and
send the output to a file. I would like to implement R as part of an
online client-server application for a geographically spaced engineering
team an would like to know how to run
2007 May 16
2
Running R function as a Batch process
Hi,
I am struggling with using R CMD BATCH command. Kindly suggest solution to
the following problem.
I have a function named CinC with accept two input parameters. This can be
shown as:
CinC <- function(start, end)
where start and end both are character strings.
Please suggest me how can I run this function using command R CMD BATCH.
Currently I am trying to do like this -> R CMD
2012 May 03
1
is there a way of identifying batch mode running?
Hello list
Is there a way of identifying from within R whether a script has been source(d) from Rgui.exe or via Rscript.exe in batch mode?
For the code I have I use the commandArgs() function to pick up command line args when running in batch mode via Rscript.exe
However I like to get the code working manually first using source("MyRCode.r")
I'd like to be able to put something at
2003 Apr 17
2
BATCH and tcltk
Hi R-hackers
I try to write a batch (in Windows, i have to use!) with
Rcmd BATCH D:\Test.R D:\Test.Rout and
Rterm.exe --no-restore --no-save < D:\Test.R > D:\Test.Rout.
In my file Test.R are any tk-codelines (like: Window1 <- tktoplevel(); ... tkbutton...).
It works not interactifly, what is written in Rcmd BATCH --help.
Exist there a way to do it all the same?
Please help...
2003 May 20
1
R in BATCH mode
Dear all,
In R<=1.6.2 I usually used the following code (in DOS prompt) to run R in
batch mode
C:\documents> Rcmd BATCH myfile.R
and I could see the results (including warning messages) in the file
myfile.Rout
In R.1.7.0 I'm experiencing the followings:
(1) even if I type "Rcmd BATCH myfile.R myfile.Rout",
no file myfile.Rout is created, but just a "&1" file
2008 Jan 04
1
R command line arguments
Hi,
I would like start R in BATCH mode and submit my own parameters. Or in other
words, I would like to specify variables from the command line and execute a
script using those.
I have been looking at commandArgs and calling R from the command line under
bash:
R CMD BATCH --no-save --args -filename="$filname" -- r-test.R r-test.Rout
The problem here is, if $filename contains
2006 Nov 23
2
command option for R CMD BATCH
I wish to use R CMD BATCH to run a small R function which reads a text
file and plots a single graph to a PDF file.
> version
_
platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major
2017 Jul 12
1
submitting R scripts with command_line_arguments to PBS HPC clusters
Hi,
The problem is most likely, you need to call a R CMD BATCH with your arguments and the R-script inside of a shell script that you submit to your qsub.
Unfortunately we don't use qsub anymore so can't test it, but it should be as follows:
R-script eg. test.R:
> ##First read in the arguments listed at the command line
> args=(commandArgs(TRUE))
>
> ##args is now a list of
2011 Mar 23
1
How identify args into R, sent from a command line.
Hi,
For example, I have several variables in php, like
var1 = 1, 2, 3, 5, 6
var2 = 3, 1, 8
var3 = 8, 10, 4, 0, 9, 1
I sent the arguments to R, with this line:
'/usr/bin/R --vanilla --slave --args '.$var1.' '.$var2.' '.$var3.' < script.r'
In my "script.r" I can read the arguments whit this line:
args=(commandArgs(TRUE))
args=as.numeric(args)
args
2005 Feb 25
3
passing command line arguments to 'R CMD BATCH myScript.R'
Hi Community,
I have a question about how to pass command line parameters to R script
running in the batch mode. The problem is: there is a banch of data
files which are to be processed by R script called from a web-server,
i.e. in the batch mode. The web server generates data files and passes
their names calling 'R CMD BATCH' one by one for every file. Now the
question is how to
2011 May 24
1
R in batch mode
Hi Everyone,
I am a new R user and trying to run R jobs in batch mode.
Robert Muenchen (2009), in his book "R for SAS and SPSS Users", has suggested writing a small batch file like mR.bat as shown below:
"C:\Program File\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>& 1
Could anyone tell me in which directory or subdirectory I should
2002 Jun 25
1
commandArgs: feature request
Dear R-core Team,
As Thomas Lumley pointed out in one of his e-mails one can use commandArgs()
to get a copy of the command line arguments supplied when R session was
invoked and then use grep to extract parameters of interest.
His solution works very well if the custom options are passed by names, e.g.
--my-option=value, but what if one wants to pass parameters by their
positions. Then it's
2010 Dec 06
1
R cmd batch with parameters
hello!
I'm trying to make a very simple calculation using R that would called
from bash with two parameters, the names of the input and output files.
the first one is just an 4 by 100 numerical table- the function finds
the index of the maximal elements in each columns and writes it into the
output file.
I cannot deal somehow with passing the parameters to the function it
works from R with the
2010 Apr 08
1
texi2dvi runs but produces no output
I am working on a Windows XP machine with R 2.10.1 and a recent
installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents
and have it set up to run Sweave, Stangle, and make the PDF through R
using a batch script and a MakeSweave.R file. This system worked just
fine until I ran some MiKTeX updates yesterday. This is a bit
embarrassing as I helped produce a "How-to" guide to
2009 Mar 02
1
how to pass a command variable in DOS to R program in R CMD BATCH
Hi all,
I need to run a program (asreml) thousands of times and each time I have
to provide a slightly different dataset. Because I have to run asreml
under Windows (DOS or scripts) environment, I have trouble to pass a
command variable (or pointer variable or %counter in the following
example) to R program so at each counter R can generate a different data
set for asreml to run. Any