ucd-ipo / agroft

Agricultural Field Trial Statistics Package
http://ucd-ipo.github.io/agroft/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Installation of the app from source does not automatically install dependencies. #76

Closed moorepants closed 8 years ago

moorepants commented 9 years ago

I though that installing like so:

install.packages('master.tar.gz', type = 'source')

would try to install the dependencies from CRAN, but is doesn't. It fails. Need to figure out a way to install the package in R wihtout having it on CRAN and without requiring devtools.

rkingdc commented 9 years ago

couldn't you just install dependencies first, then install the source package?

On Thu, Aug 20, 2015 at 4:30 PM, Jason K. Moore notifications@github.com wrote:

I though that installing like so:

install.packages('master.tar.gz', type = 'source')

would try to install the dependencies from CRAN, but is doesn't. It fails. Need to figure out a way to install the package in R wihtout having it on CRAN and without requiring devtools.

— Reply to this email directly or view it on GitHub https://github.com/ucd-ipo/aip-analysis/issues/76.

rkingdc commented 9 years ago

Also, take a look at drat. https://github.com/eddelbuettel/drat

I don't know a whole lot about it, but we might be able to leverage that to our advantage here.

moorepants commented 9 years ago

Yes, the dependencies can be installed first but what's the point of DESCRIPTION file with all the dependencies if you have to manually install anyways. I'm new to R packaging, don't really know how it all works.

I don't understand what drat is.

rkingdc commented 9 years ago

One can use drat to create a local repo or one on github. We could create a github repo that has the exact package versions the user should use with the app. Instead of installing packages from CRAN, the user would install the packages from the drat repo. That way we can ensure that a user installing new packages won't install a version that is incompatible with the app. We could include binaries for shinyace and the other packages as well. It won't depend on devtools--we would be essentially be creating a mini-CRAN, if you will, that the user installs from using install.packages.

Yes, the dependencies can be installed first but what's the point of DESCRIPTION file with all the dependencies if you have to manually install anyways. I'm new to R packaging, don't really know how it all works.

I don't understand what drat is.

— Reply to this email directly or view it on GitHub https://github.com/ucd-ipo/aip-analysis/issues/76#issuecomment-133193632.

moorepants commented 9 years ago

I see. Cool. Typically for web app development you want to pin to exact versions of dependencies. By default R doesn't make that easy because install.packages() can only install the latest version of a package. drat sounds like a nice solution to that. I'll look into it.

moorepants commented 9 years ago

This is an interesting solution for packaging R apps: https://github.com/rstudio/packrat

I've also been trying out conda since it recently started supporting R packages.

rkingdc commented 9 years ago

Packrat could work, but I think it would have to be installed on the flash drive. I'm still leaning towards drat, since we could have source packages and binaries and host the app there as well so people can install via install.packages and they don't have to go through any extra work. I've played around with packrat a bit about a year ago, and unless a lot has changed (which it probably has), it isn't super user friendly. Doesn't conda require a python instillation?

On Tue, Aug 25, 2015 at 7:40 PM, Jason K. Moore notifications@github.com wrote:

This is an interesting solution for packaging R apps: https://github.com/rstudio/packrat

I've also been trying out conda since it recently started supporting R packages.

— Reply to this email directly or view it on GitHub https://github.com/ucd-ipo/aip-analysis/issues/76#issuecomment-134779408 .

moorepants commented 9 years ago

Conda requires a Python install. But we're drifting here.

None of this really matters for the flash drive. You can install whatever versions of the packages you want on the flash drive. The installation issues are really just related to whether we want people to be able to install R and the package with everything working on on their on machine. It'd be nice to pin dependencies to specific number in that case. Or if we want people to be able to easily build their own flash drives.

rkingdc commented 8 years ago

new devtools::install_github() version installs dependencies