similar to: Rscript Bug Report (improper parsing of [args])

Displaying 20 results from an estimated 10000 matches similar to: "Rscript Bug Report (improper parsing of [args])"

2014 Sep 18
1
last user argument missing from Rscript --verbose
The loop that echoes the arguments almost always stops too soon. It apparently does that to avoid echoing the "--args" (that had been inserted) when there are no user arguments. However, when there are user arguments, the next element of the 'av' array is the last argument and usually not "--args", although it can be. ?Rscript is a little sketchy: ?--verbose?
2007 Aug 27
1
R 2.5.1 - Rscript through tee
Hi, people. I met a little problem for which someone might have a solution. Let's say I have an executable file (named "pp.R") with this contents: #!/usr/bin/Rscript options(echo=TRUE) a <- 1 Sys.sleep(3) a <- 2 If I execute "./pp.R" at the shell prompt, the output shows the timely progress of the script as expected. If I use "./pp.R | tee
2017 Dec 27
3
Rscript fails with some packages (for example, h5)
On 26/12/2017 9:40 AM, Dirk Eddelbuettel wrote: > > On 26 December 2017 at 22:14, Sun Yijiang wrote: > | Thanks for the solution. Now I know the work-arounds, but still don't > | quite get it. Why does R_DEFAULT_PACKAGES has anything to do with > | library(methods)? > > Because it governs which packages are loaded by default. And while R also > loads
2012 Mar 28
2
getopt does not work as expected!
I have the following script (also attached): #!/usr/bin/Rscript spec=matrix(c( 'verbose', 'v', 1, "integer", 'help' , 'h', 0, "logical" ),ncol=4, byrow=TRUE) spec.dim=dim(spec) spec.opt.long=spec[,1] spec.opt.short=spec[,2] spec.opt.l <- spec.dim[1] infile <- "test.dat" args=commandArgs(TRUE); l=length(args) self =
2012 Feb 15
1
Cannot use setClass() in Rscript
Greetings, I am creating a standalone executable script using Rscript and have run into problems when I define a new S4 class. Here is a small script that demonstrates my problem: #!/usr/bin/env Rscript # # toy.Rscript -- testing S4 class creation in an Rscript setClass("toy", representation(name = "character", price = "numeric"),
2011 Sep 19
1
Rscript path problem on R 2.13.1 for Ubuntu 11.04?
Dear all, finally decided to do an Ubuntu upgrade and a new clean R install from http://cran.r-project.org/bin/linux/ubuntu/. However, while trying to install a package from R-forge I encountered problems, involving error messages saying "Rscript execution error: No such file or directory" (see below). The same procedure works on Ubuntu 11.04 running R 2.12.1-1 from the Ubuntu
2011 Aug 17
1
A question about using getSrcDirectory() with R/Rscript
Good morning R-help, I have an idiot question: I would like to use getSrcDirectory() and friends to allow me to identify where an R file has been called from when invoked using Rscript. If I understand the documentation correctly, the following example should work: In file test.R: options(keep.source=T) fn<-function(x){x<-x+1} srcDir<-getSrcDirectory(fn) print(srcDir) I
2007 Apr 30
2
Rscript.Rd example (PR#9644)
One of the examples in Rscript.Rd seems mis-formatted, in that the format statement is incomplete: ## Not run: Rscript -e 'date()' -e 'format(Sys.time(), " Both Rscript.Rd in R 2.5.0 and the version at: https://svn.r-project.org/R/trunk/src/library/utils/man/Rscript.Rd have Rscript -e 'date()' -e 'format(Sys.time(), "%a %b %d %X %Y")' Do
2012 Feb 08
1
optparse::parse_args, using equals sign or not
Hi We've found that when using parse_args(..., positional_arguments=FALSE), it is permissible to invoke our script with either "--myfoo=bar" or "--myfoo bar"; that is, whether or not the equals sign is present makes no difference, and in fact both usage forms are demonstrated in the optparse vignette. However, we've found that when using parse_args(...,
2009 Mar 24
1
problem with Rscript
Hi all, this is probably some tricky configuration file problem, but I figure someone here might have come across this in the past: In short, I've been using Rscript to run my scripts, usually successfully. But recently I've run into a strange problem, and the only function that causes an error is "print". I can create a file that contains only a print command, and it causes
2012 Feb 09
1
Autorun Picks Up Options
Hi, I was trying to use the autorun feature of rspec but noticed that when I run the command to kick off the ruby scripts it picks up the options that I give to the command. ''myRubyBin -j optionValue'' This then fails with this error, /usr/lib/ruby/1.8/optparse.rb:1448:in `complete'' : invalid option: -j ( OptionParser::InvalidOption ) from
2013 Mar 09
1
Why cannot `Rscript -e` accept an empty line?
See the example below (under Ubuntu): $ Rscript -e '1' -e '2' [1] 1 [1] 2 $ Rscript -e '1' -e '' -e '2' ERROR: option '-e' requires an argument $ uname -a Linux xie 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Similar problem under Windows: Rscript -e "1" -e "" -e "2" [1]
2016 Feb 10
2
Change Rscript and `/usr/lib/R/bin/R` relation
Dear all, I am trying to use multiple version of R unpacked from CRAN deb files. It does work successfully, except for some packages installation, whether Rscript has been used. I have configured alternatives and switch R environments without any problem and can install most of the packages. '====================================================== $ update-alternatives --display R R - auto
2018 Apr 26
1
Bug in RScript.exe for 3.5.0
Thanks Tomas. I confirm the quick workaround works for me in the DOS prompt, and when having a shortcut to RScript in SendTo, and when used in the Task Scheduler. I have not tested the R-devel version, due to my unfamiliarity with installing from source code. -----Original Message----- From: Tomas Kalibera [mailto:tomas.kalibera at gmail.com] Sent: Thursday, April 26, 2018 6:34 AM To: Kerry
2007 Dec 17
1
names in Rscript -e
Hi, I seem to have a problem when passing named parameters to R via Rscript (R2.5.1, bash shell). As soon as I name elements of a list Rscript generates an error. I will appreciate if someone could point to me a correct way of doing this. Thanks, Vadim ## This works bash-3.2$ Rscript.exe -e 'list(1)' [[1]] [1] 1 # and these do not work bash-3.2$ Rscript.exe -e
2012 May 24
1
quotes in Rscript -e through system
I figured out how to use quotes and parentheses when using Rscript -e (on a bash shell): Rscript -e write\(1,\"a.txt\"\) --> Question 1: why do the parentheses need to be escaped in the shell? (More a shell than an R question) Then I figured out how to use quotes and parentheses when calling Rscript through system: system('Rscript -e write\\(1,\\\'a.txt\\\'\\)')
2014 Jul 09
1
[patch] Rscript off-by-one error in output
Rscript eats up the last argument when reporting the command it runs: $ Rscript --verbose "/tmp/test.R" one two three running '/usr/local/lib/R-devel/lib/R/bin/R --slave --no-restore --file=/tmp/test.R --args one two' With the patch below, I get the following: $ Rscript --verbose "/tmp/test.R" one two three running '/usr/local/lib/R-devel/lib/R/bin/R --slave
2018 Apr 25
2
Bug in RScript.exe for 3.5.0
Hi R Developers, I have found what I think is a bug in the RScript.exe in version 3.5.0 of R for Windows. When I call Rscript.exe for Version 3.5 of R, it is unable to open the file if the file name or path has a space in it. As an example of what happens, I saved 2 files with the code: cat("What do you get when you multiply 6 * 9?") as C:\foo bar.R and as C:\foo_bar.R When I in a DOS
2012 May 31
3
RScript.exe and map directory issue
Hi, I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within Excel 2010 with the following code: Call Shell(rPath & "\Rscript.exe C:\Work\Latest\_Test.R", vbHide) The good news is: the above code works perfectly, but ... If I add white spaces to my map directory, like: Call Shell(rPath & "\Rscript.exe C:\Work\Latest 1\_Test.R", vbHide) In the
2012 Apr 13
4
#!/usr/bin/env Rscript --vanilla ??
I think that's my first true question (rather than answer) to R-help. As R has, for a long time, become my primary scripting and programming language, I'm prefering at times to write Rscript files instead of shell scripts, notably when R has nice ways to do some of the things. On a standard standalone platform with standard R, I would start such a script with