Re: [Rd] Runnable R packages

2019-02-01 Thread Abs Spurdle
Further to my previous post, it would be possible to create an .exe file, say: my_r_application.exe That starts R, loads your R package(s), calls the R function of your choice and does whatever else you want. However, I don't think that it would add much value. But feel free to correct me if

Re: [Rd] Runnable R packages

2019-02-01 Thread Abs Spurdle
This is possibly the most redundant discussion I've ever seen on the R mailing lists. In the original post: > 2) It provides no way to deal with dependencies on other packages > 3) It provides no way to "run" an application provided as an R package Both completely false statements. > recently

[Rd] Set the number of threads using openmp with .Fortran?

2019-02-01 Thread Ignacio Martinez
Hi everybody, I'm trying to develop an R package with Fortran and OpenMP. I wrote a simple hello world but I'm not able to set the number of threads. I found this old email chain and I tried to set my

Re: [Rd] Runnable R packages

2019-02-01 Thread Dirk Eddelbuettel
On 1 February 2019 at 13:31, William Dunlap via R-devel wrote: | To download a package with all its dependencies and install it, use the | install.packages() functions instead of 'R CMD INSTALL'. E.g., in bash: | | mkdir /tmp/libJunk | env R_LIBS_SITE=libJunk R --quiet -e 'if |

Re: [Rd] Runnable R packages

2019-02-01 Thread William Dunlap via R-devel
To download a package with all its dependencies and install it, use the install.packages() functions instead of 'R CMD INSTALL'. E.g., in bash: mkdir /tmp/libJunk env R_LIBS_SITE=libJunk R --quiet -e 'if (!requireNamespace("purrr",quietly=TRUE)) install.packages("purrr")' For corporate

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Avraham Adler
No error on Windows 10, R.3.5.2 patched, Rblas compiled with OpenBLAS 0.20, Rlapack is base. > f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) > opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) > str(opt) List of 6 $ par: num [1:10] 1 1 1 1 1 ... $ objective : num -41.4 $

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Rui Barradas
Hello, R 3.5.2 on ubuntu 18.04. sessionInfo() at the end. Works with me, same results, cannot reproduce the error. f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) str(opt) xhat <- rep(1, 10) all.equal(opt$par, xhat, tol=0) #

Re: [Rd] Runnable R packages

2019-02-01 Thread Barry Rowlingson
Ummm oops. Magic pixies? It assumed all of CRAN was installed? Maybe I'll write something that could go in /usr/lib/R/bin/RUN that checks and gets deps, installs the package, and runs package::main, which I think is what the OP wants - you could do R CMD RUN foo_1.0.0.tar.gz and away it goes...

Re: [R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Troels Ring
Thanks a lot - that solved the issue! Best wishes Troels -Oprindelig meddelelse- Fra: Duncan Murdoch Sendt: 1. februar 2019 15:42 Til: Troels Ring ; package-develop Emne: Re: [R-pkg-devel] vignette problems: invisible On 01/02/2019 9:23 a.m., Duncan Murdoch wrote: > On 01/02/2019

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Martin Maechler
> Berend Hasselman > on Fri, 1 Feb 2019 15:59:58 +0100 writes: >> On 1 Feb 2019, at 10:00, Martin Maechler wrote: >> >> sessionInfo() >>> R version 3.5.2 (2018-12-20) >>> Platform: x86_64-pc-linux-gnu (64-bit) >>> Running under: Scientific

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Berend Hasselman
> On 1 Feb 2019, at 10:00, Martin Maechler wrote: > > >>> sessionInfo() >> R version 3.5.2 (2018-12-20) >> Platform: x86_64-pc-linux-gnu (64-bit) >> Running under: Scientific Linux release 6.4 (Carbon) > >> Matrix products: default >> BLAS/LAPACK: >>

Re: [R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Duncan Murdoch
On 01/02/2019 9:23 a.m., Duncan Murdoch wrote: On 01/02/2019 8:22 a.m., Troels Ring wrote: devtools::install_github("troelsring/ABCharge",force=TRUE,build_vignettes = TRUE) That looks like an issue with install_github. The normal way to install a package is to build the tarball, then install

Re: [R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Duncan Murdoch
On 01/02/2019 8:22 a.m., Troels Ring wrote: devtools::install_github("troelsring/ABCharge",force=TRUE,build_vignettes = TRUE) That looks like an issue with install_github. The normal way to install a package is to build the tarball, then install from that. When I do that with your package,

Re: [R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Troels Ring
By the way: devtools::install_github("troelsring/ABCharge",force=TRUE,build_vignettes = TRUE) didn't help BW Troels Fra: Troels Ring Sendt: 1. februar 2019 12:15 Til: package-develop (r-package-devel@r-project.org) Emne: vignette problems: invisible Dear friends - I'm closing in on

Re: [R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Hong Ooi via R-package-devel
--- Begin Message --- The various devtools::install_* functions don't install vignettes by default; to do so, add the build_vignettes=TRUE argument. -Original Message- From: R-package-devel On Behalf Of Troels Ring Sent: Friday, 1 February, 2019 10:15 PM To: package-develop Subject:

[R-pkg-devel] vignette problems: invisible

2019-02-01 Thread Troels Ring
Dear friends - I'm closing in on finalizing the package and its current version is on github/troelsring/ABCharge and it passes ctrl shift E without errors and now also has a vignette. I can see the vignette OK in its directory but issuing after installing from github by devtools, it cannot be

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Ralf Stubner
On 01.02.19 10:00, Martin Maechler wrote: >> f <- function(x) sum( log(diff(x)^2+.01) + (x[1]-1)^2 ) >> opt <- nlminb(rep(0, 10), f, lower=-1, upper=3) >> str(opt) > List of 6 > $ par: num [1:10] 1 1 1 1 1 ... > $ objective : num -41.4 > $ convergence: int 0 > $ iterations : int 66 >

Re: [Rd] nlminb with constraints failing on some platforms

2019-02-01 Thread Martin Maechler
> Kasper Kristensen via R-devel > on Mon, 28 Jan 2019 08:56:39 + writes: > I've noticed unstable behavior of nlminb on some Linux > systems. The problem can be reproduced by compiling > R-3.5.2 using gcc-8.2 and running the following snippet: > f <- function(x)

Re: [Rd] Runnable R packages

2019-02-01 Thread David Lindelof
@Barry I'm not sure your proposal would work, since `R CMD INSTALL` won't install a package's dependencies. Indeed it will fail with an error unless all the dependencies are met before calling it. Speaking of which, why doesn't R CMD INSTALL install a package's dependencies? Would it make sense