Displaying 20 results from an estimated 9000 matches similar to: "good documentation on use of Rscript. where to find?"
2012 May 17
1
Windows Task Scheduler and R updates. Need basic tips
This is a basic Windows system administrator problem, asked by a Linux
guy who is helping out in a Windows lab.
I want to keep R packages up to date on MS Windows 7 with a job in the
"Task Scheduler". I have an R program that I can run (as
administrator) that updates the existing packages and then installs
all the new ones.
I do not understand how to run that in a dependable way in
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
2008 Jan 09
1
Rscript on OSX
Hi,
I directed somebody to install R (2.6.1) on his OSX computer,
following instructions from http://cran.r-project.org/bin/macosx.
She can run R from the console.
But plot(1:10) doesn't produce any output or open a window (as I am
used to from linux).
More importantly:
Rscript is not in the path (minor problem ln -s is hopefully doable). I tried
to put a hardcoded path to Rscript into the
2007 Jan 26
1
Rscript on Windows
On UNIX one can use #! notation. It would be nice to be able to do something
similar on Windows.
This could be done by giving Rscript the capability of skipping over
the first few
lines. For example, there might be a --skip=n argument or perhaps Rscript would
skip over any consecutive leading lines that begin with @ in the R
file since that
cannot be syntactically correct R but does have
2010 May 20
1
Use of R and Rscript in configure/Makevars in packages
We have seen problems with a number of packages which use R/Rscript to
run R code in configure or makefiles.
(a) You must give a full path: there need be no version of R in the
path, and if there is it might not be the version/build of R under
which package installation is being done. So the general form is to
use
${R_HOME}/bin/R
to select the right version. And since ${R_HOME} might
2012 Dec 09
3
Where is located the rscript in mac osx??
Dear all,
I have a very simple question. I am trying to find where islocated the rscript in mac os x. The r is installed in the applications folderbut I can not find the rscript.
Thank you.Dimitris
[[alternative HTML version deleted]]
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 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"),
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 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
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]
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
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
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
2013 Sep 21
2
regenerate Rscript after moving R installation
L.S.
In this bug report
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14493#c1
it is mentioned that after moving an R installation
one should regenerate the Rscript executable.
Is there an easy way to do so (after an R installation has been
moved)?
I have not found any information in the R installation and
administration manual.
Many thanks in advance for any pointer.
Best wishes,
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?
2019 Feb 28
2
Exit status of Rscript
Current R release (3.5.2) and devel return a 0 exit status on error,
while prior versions returned a non-zero exit status. On Linux and
MacOs, the following line returns TRUE for R-3.5.2 and R-devel, and
FALSE for R-3.5.1 and R-3.5.0:
system2("Rscript", c("-e", shQuote("stop('foo')"))) == 0
I didn't find this in the NEWS, so I believe this is a bug.
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\\\'\\)')
2008 Apr 28
2
Problems with Rscript executable.
Good Morning,
I have recently built R version 2.7.0 on a CentOS release 4.6, 64-bit
system using the following command:
./configure --prefix=/usr/local/r-2.7.0
Everything built fine and works properly except for Rscript which is
looking for files in the original build directory instead of the
specified install directory. Did I forget to add a flag or is this a bug?
TIA,
Gregg.