Displaying 20 results from an estimated 7000 matches similar to: "Plots automatically closing when using RScript"
2017 Oct 20
1
Rscript Bug Report (improper parsing of [args])
Hi,
A user of my `optparse` package discovered a bug in Rscript's parsing of
[args]. (https://github.com/trevorld/optparse/issues/24)
I've reproduced the bug on my machine including compiling and checking the
development version of R. I couldn't find a mention of it in the Bug
Tracker or New Features.
Can be minimally reproduced on the UNIX command line with following
commands:
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 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
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
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
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
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
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?
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
2010 Jul 08
1
Why Rscript behaves strangely with file name starting with 'size'?
Hello All,
It seems weird to me that Rscript does the following thing and enters
the R prompt mode. If I change the file name to something that doesn't
start with 'size', then Rscript runs normally. Does anybody know what
is going on?
$ Rscript size.R
WARNING: '--file=size.R' value is invalid: ignored
>
$ Rscript --version
R scripting front-end version 51072
--
Tom
2010 Jan 21
1
Rscript question
Hi,
I have some code I run interactively through the R interpreter and it works
fine. I then run it as a script with Rscript and I get an error. The error
is coming when Rscript builds a model matrix.
Here is the Rscript code :
#!/usr/lib/R/bin/Rscript --verbose
require(MASS)
options(contrasts = c("contr.treatment", "contr.poly"))
....
form <- as.formula(paste(ef.var,
2018 Apr 26
2
Bug in RScript.exe for 3.5.0
Fixed in R-devel. I will port to R-patched after more testing.
Tomas
On 04/26/2018 01:52 AM, Tomas Kalibera wrote:
> Thanks for the report. A quick workaround before this gets fixed is to
> add an extra first argument that has no space in it, e.g.
>
> Rscript --vanilla "foo bar.R"
>
> The problem exists on all systems, not just Windows.
>
> Best
> Tomas
>
2018 Feb 01
1
Error message: 'Rscript' should not be used without a path
Dear R-devel members,
recently, I ran into the following error message (R-devel 2018-01-31):
'Rscript' should not be used without a path -- see par. 1.6 of the manual
I would like to know more about it, why is it required to run Rscript with
a path, and where is that par. 1.6 of the manual.
I get this error message during Travis r-devel build of my package for
generating makefiles. I