Re: [Rd] Runnable R packages

2019-02-08 Thread Abs Spurdle
I'm not sure whether GCC is in Rtools or not. I will check on Monday. However, that's not the main point. In Rtools, there's nothing like the following: R CMD Rpkg2exe -o my_r_application.exe my_r_package or R CMD Rpkg2exe -o my_r_application.exe my_r_package_0.1.0.tar.gz Which would convert

Re: [Rd] Runnable R packages

2019-02-08 Thread David Lindelof
Sure, you can find it here: https://github.com/dlindelof/run On Fri, Feb 8, 2019 at 9:41 AM Rainer M Krug wrote: > Sounds interesting. Do you have it on GitHub or similar? > > Rainer > > On 8 Feb 2019, at 09:09, David Lindelof wrote: > > Yesterday I wrote and submitted to CRAN a package

Re: [Rd] Runnable R packages

2019-02-08 Thread Rainer M Krug
Sounds interesting. Do you have it on GitHub or similar? Rainer > On 8 Feb 2019, at 09:09, David Lindelof wrote: > > Yesterday I wrote and submitted to CRAN a package `run`, which implements > the ideas discussed in this thread. Given a package tarball > foo_0.1.0.tar.gz, users will be able to

Re: [Rd] Runnable R packages

2019-02-08 Thread David Lindelof
Yesterday I wrote and submitted to CRAN a package `run`, which implements the ideas discussed in this thread. Given a package tarball foo_0.1.0.tar.gz, users will be able to run Rscript -e "run::run('foo_0.1.0.tar.gz')" which will pull all the dependencies of package `foo`, lookup a function

Re: [Rd] Runnable R packages

2019-02-07 Thread Peter Meissner
Doesn't Rtools provide everything needed to build R packages and R on Windows - including gcc? Am Sa., 2. Feb. 2019 um 22:29 Uhr schrieb Abs Spurdle : > Creating an .exe file isn't necessarily difficult. > The main problems are that you have to write and compile the C (or other) > files. >

Re: [Rd] Runnable R packages

2019-02-02 Thread Abs Spurdle
Creating an .exe file isn't necessarily difficult. The main problems are that you have to write and compile the C (or other) files. Otherwise, the complexity depends on the level of Inter Process Communication that's required. Simply starting R with some initial conditions, is easy. Even if you

Re: [Rd] Runnable R packages

2019-02-02 Thread Ben Bolker
e widely installed that remotes? > > Kind regards, > > From: Duncan Murdoch > Reply: Duncan Murdoch > Date: 2 February 2019 at 15:37:16 > To: Barry Rowlingson > , Abs Spurdle > > Cc: r-devel > Subject: Re: [Rd] Runnable R packages > > On 02/02

Re: [Rd] Runnable R packages

2019-02-02 Thread David Lindelof
? The latter seems to have the same functions I would need, and I believe it is more widely installed that remotes? Kind regards, From: Duncan Murdoch Reply: Duncan Murdoch Date: 2 February 2019 at 15:37:16 To: Barry Rowlingson , Abs Spurdle Cc: r-devel Subject: Re: [Rd] Runnable R packages

Re: [Rd] Runnable R packages

2019-02-02 Thread Duncan Murdoch
On 02/02/2019 8:27 a.m., Barry Rowlingson wrote: I don't think anyone denies that you *could* make an EXE to do all that. The discussion is on *how easy* it should be to create a single file that contains an initial "main" function plus a set of bundled code (potentially as a package) and which

Re: [Rd] Runnable R packages

2019-02-02 Thread Barry Rowlingson
I don't think anyone denies that you *could* make an EXE to do all that. The discussion is on *how easy* it should be to create a single file that contains an initial "main" function plus a set of bundled code (potentially as a package) and which when run will install its package code (which is

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

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] 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: [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

Re: [Rd] Runnable R packages

2019-01-31 Thread David Lindelof
Would you care to share how your package installs its own dependencies? I assume this is done during the call to `main()`? (Last time I checked, R CMD INSTALL would not install a package's dependencies...) On Thu, Jan 31, 2019 at 4:38 PM Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: >

Re: [Rd] Runnable R packages

2019-01-31 Thread Jan Gorecki
Quoting: "In summary, I'm convinced R would benefit from something similar to Java's `Main-Class` header or Python's `__main__()` function. A new R CMD command would take a package, install its dependencies, and run its "main" function." This kind of increase the scope of your idea. New command

Re: [Rd] Runnable R packages

2019-01-31 Thread Barry Rowlingson
On Thu, Jan 31, 2019 at 3:14 PM David Lindelof wrote: > > In summary, I'm convinced R would benefit from something similar to Java's > `Main-Class` header or Python's `__main__()` function. A new R CMD command > would take a package, install its dependencies, and run its "main" > function. I

Re: [Rd] Runnable R packages

2019-01-31 Thread Duncan Murdoch
On 31/01/2019 9:32 a.m., David Lindelof wrote: Belated thanks to all who replied to my initial query. In summary, three approaches have been mentioned to run R code "in production": 1) ShinyProxy, mentioned by Tobias, for deploying Shiny applications; 2) Docker-like solutions, mentioned by

Re: [Rd] Runnable R packages

2019-01-31 Thread David Lindelof
Belated thanks to all who replied to my initial query. In summary, three approaches have been mentioned to run R code "in production": 1) ShinyProxy, mentioned by Tobias, for deploying Shiny applications; 2) Docker-like solutions, mentioned by Gergely and Iñaki; and 3) Solutions based on Rscript

Re: [Rd] Runnable R packages

2019-01-07 Thread Iñaki Ucar
On Mon, 7 Jan 2019 at 22:09, Gergely Daróczi wrote: > > Dear David, sharing some related (subjective) thoughts below. > > You can provide your app as a Docker image, so that the end-user > simply calls a "docker pull" and then "docker run" -- that can be done > from a user-friendly script as

Re: [Rd] Runnable R packages

2019-01-07 Thread Dirk Eddelbuettel
On 7 January 2019 at 22:09, Gergely Daróczi wrote: | You can provide your app as a Docker image, so that the end-user | simply calls a "docker pull" and then "docker run" -- that can be done | from a user-friendly script as well. | Of course, this requires Docker to be installed, but if that's a

Re: [Rd] Runnable R packages

2019-01-07 Thread Murray Stokely
Some other major tech companies have in the past widely use Runnable R Archives (".Rar" files), similar to Python .par files [1], and integrate them completely into the proprietary R package build system in use there. I thought there were a few systems like this that had made their way to CRAN or

Re: [Rd] Runnable R packages

2019-01-07 Thread Dirk Eddelbuettel
On 3 January 2019 at 11:43, David Lindelof wrote: | Dear all, | | I’m working as a data scientist in a major tech company. I have been using | R for almost 20 years now and there’s one issue that’s been bugging me of | late. I apologize in advance if this has been discussed before. | | R has

Re: [Rd] Runnable R packages

2019-01-07 Thread Gergely Daróczi
Dear David, sharing some related (subjective) thoughts below. On Mon, Jan 7, 2019 at 9:53 PM David Lindelof wrote: > > Dear all, > > I’m working as a data scientist in a major tech company. I have been using > R for almost 20 years now and there’s one issue that’s been bugging me of > late. I

[Rd] Runnable R packages

2019-01-07 Thread David Lindelof
Dear all, I’m working as a data scientist in a major tech company. I have been using R for almost 20 years now and there’s one issue that’s been bugging me of late. I apologize in advance if this has been discussed before. R has traditionally been used for running short scripts or data analysis