Displaying 20 results from an estimated 10000 matches similar to: "#!/usr/bin/env Rscript --vanilla ??"
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
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"),
2018 Apr 26
2
Bug in RScript.exe for 3.5.0
Hi Tomas,
Thanks for the info about the binary builds; I did install it, however the bug still seems to be there in the current build. The workaround you suggested does work:
C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R"
Fatal error: cannot open file 'C:\foo': No such file or directory
C:\>"C:\Program
2011 Mar 14
1
Rscript, hashbang, and arguments
Hi,
I have a bunch of R scripts which have the hash bang !/usr/bin/env Rscript
and I typically run these scripts by passing in some parameters like this:
./nameOfRScript arg1 arg2 ...
I know Rscript has the option to run in --vanilla. Where exactly do I
insert the --vanilla option? When I do something like this:
./nameOfRScript --vanilla arg1 arg2 ...
And I try to access the commandArgs,
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
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
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
>
2012 Oct 18
1
good documentation on use of Rscript. where to find?
What is the correct format for the shebang line and what options are
allowed or necessary along with this?
I find plenty of blogs and opinions, but few authoritative answers.
I want an R script to run and update packages periodically, with a
cron job that launches it. What is necessary to put in
line one of the R program. Aside from the basic part
#!/usr/bin/Rscript
what else can there be, or
2016 Feb 10
0
Change Rscript and `/usr/lib/R/bin/R` relation
Thanks for bringing the question over from StackOverflow [1]. I am not very
impressed that you STILL hide behind a pseudonym and I am starting to
question my sanity as to why I take time out to help someone like
that. Anyway, read on ...
[1] http://stackoverflow.com/questions/35313704/rscript-launch-custom-r/
On 10 February 2016 at 15:50, Cron Acronis wrote:
| Dear all,
|
| I am trying to use
2009 Jun 01
1
Plots automatically closing when using RScript
I would like to be able to run an R script from the command line using
RScript.exe. The problem is, my script generates some plots which are being
automatically closed as soon as the script reaches its end. Is there a way
to force the plot windows to remain open until the user explicitly closes
them?
Example:
Rscript --vanilla -e "plot(1:100)"
The above line will create a plot that
2016 Feb 12
1
Change Rscript and `/usr/lib/R/bin/R` relation
On Wed, 10 Feb 2016 10:18:51 -0600, Dirk Eddelbuettel wrote:
> Thanks for bringing the question over from StackOverflow [1]. I am not
> very impressed that you STILL hide behind a pseudonym and I am starting
> to question my sanity as to why I take time out to help someone like
> that. Anyway, read on ...
>
> [1]
2010 Oct 14
1
Using Rscript to read from a file
Hello,
I have this script which will be invoked as
Rscript a.r < a.r
a.r follows
#!/usr/bin/Rscript --vanilla
f=file("stdin")
while(TRUE){
y=readLines(f,n=1,warn=TRUE)
if(length(y)==0) break else print(y)
}
But it only reads one line from a.r
How can I read line by line from standard input?
Thank you
Saptarshi
2018 Apr 27
5
Bug in RScript.exe for 3.5.0
Thanks Tomas,
I confirm the R Under development (unstable) (2018-04-26 r74651) version works for Rscript when the file name has a space, and no arguments are specified.
C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R"
R Under development (unstable) (2018-04-26 r74651)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601)
2005 Mar 18
4
Is a .R script file name available inside the script?
Hi,
if we have a file called Rscript.R that contains the following, for example:
x <- 1:100
outfile = "Rscript.Rout"
sink(outfile)
print(x)
and then we run
>> source("Rscript.R")
we get an output file called Rscript.Rout - great!
Is there an internal variable, something like .Platform, that holds
the script name when it is being executed? I would like to use
2008 May 28
1
R as shelll script
Hi,
I have devised some applications of R as a scripting shell language and
started using it flawlessly a few months ago.
Never minded publishing it because it looked so obvious. However, a search
in the archives revealed there is no recent easy-to-use method proposed.
The latest reference I found is from 2006
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/81124.html) and even a c
wrapper
2024 Jan 06
2
tools::startDynamicHelp(): Randomly prevents R from exiting (on MS Windows)
ISSUE:
On MS Windows, running cmd.exe, calling
Rscript --vanilla -e "port <- tools::startDynamicHelp(); port; port <-
tools::startDynamicHelp(FALSE); port"
will sometimes stall R at the end, preventing it from existing. This
also happens when running R in interactive mode. It seems to stem
from calling tools::startDynamicHelp(FALSE).
Before filing a formal bug report, can
2020 Mar 19
2
R CMD check --as-cran attempts to hide R_LIBS_USER but fails
AFAIU, 'R CMD check --as-cran' tries to hide any site and user package
libraries by setting R_LIBS_SITE and R_LIBS_USER. However, contrary
to R_LIBS_SITE, it fails for R_LIBS_USER and the user's personal
library is still available for test scripts. Should I revise my
assumptions, or is that intentional?
The short version. Shouldn't:
$ R_LIBS_USER='' Rscript --vanilla -e
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:
2020 Mar 19
1
R CMD check --as-cran attempts to hide R_LIBS_USER but fails
On Wed, Mar 18, 2020 at 8:04 PM Dirk Eddelbuettel <edd at debian.org> wrote:
>
>
> On 18 March 2020 at 19:19, Henrik Bengtsson wrote:
> | AFAIU, 'R CMD check --as-cran' tries to hide any site and user package
> | libraries by setting R_LIBS_SITE and R_LIBS_USER. However, contrary
>
> What makes you think that? AFAIK --as-cran just sets a bunch of the (nearly
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