similar to: Rscript installing packages

Displaying 20 results from an estimated 30000 matches similar to: "Rscript installing packages"

2011 Sep 20
1
NLS error
Hello there, I am using NLS for fitting a complex model to some data to estimate a couple of the missing parameters. The model is - y ~ (C+((log(1-r))*exp(-A*d)*(-1+r+exp(d*(A-B)))/(r*(-A*d+d*B+log(1-r))))) where A, B and C are unknown. In order to test the model, I generate data by setting values for all parameters and add some noise (C). A <- 20 B <- 500 r <- 0.6881 d <-
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
2012 Dec 16
1
nls for sum of exponentials
Hi there, I am trying to fit the following model with a sum of exponentials - y ~ Ae^(-md) + B e^(-nd) + c the model has 5 parameters A, b, m, n, c I am using nls to fit the data and I am using DEoptim package to pick the most optimal start values - fm4 <- function(x) x[1] + x[2]*exp(x[3] * -dist) + x[4]*exp(x[5] * -dist) fm5 <- function(x) sum((wcorr-fm4(x))^2) fm6 <- DEoptim(fm5,
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,
2011 Jul 01
2
methods package not loaded by default when using Rscript in R2.13
Dear all, As the object of this mail suggests, the methods package is not loaded by default in R2.13 when using Rscript whereas it is loaded when using an interactive session. An example with the metafor package : library(metafor) example(addpoly.rma) this works in an interaction R shell, but put it in a .R file and use it with Rscript, it won't work until you added library(methods)
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
2017 Dec 26
2
Rscript fails with some packages (for example, h5)
Hi Dirk, 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)? If library(h5) works, it should just work, not depend on an environment variable. Rscript is not consistent with R, that's my confusion. Steve 2017-12-26 20:46 GMT+08:00 Dirk Eddelbuettel <edd at debian.org>: >
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
2017 Dec 26
2
Rscript fails with some packages (for example, h5)
Consider this script (with h5 installed): $ cat test.R library(h5) name <- tempfile() f <- h5file(name) file.remove(name) $ Rscript test.R Error in initialize(value, ...) : cannot use object of class "character" in new(): class "H5File" does not extend that class Calls: h5file -> new -> initialize -> initialize Execution halted $ /usr/lib64/R/bin/R --slave
2009 Sep 06
2
How to wait for a user response in Rscript?
Hi, In 'example(barplot)' running in R, I see 'Hit <Return> to see next plot:', then R waits for my input. I am wondering how to wait for a user response in Rscript. Regards, Peng
2017 Dec 27
1
Rscript fails with some packages (for example, h5)
Thanks for the details. I?m new to R, and I?m not blaming anything here, just that I?m still not clear what good it makes to keep this inconsistency between R and Rscript. To me (and probably to many others from Perl/Python etc.), this is shockingly weird. I can live with that, and I also want to know why. Steve Dirk Eddelbuettel <edd at debian.org>?2017?12?27? ??21:15??? > > Duncan,
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
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