wleepang / DesktopDeployR

A framework for deploying self-contained R-based applications to the desktop
Apache License 2.0
406 stars 120 forks source link

allow installing R package from non-CRAN source #11

Closed mayeulk closed 4 years ago

mayeulk commented 7 years ago

https://github.com/wleepang/DesktopDeployR/blob/8062916449b1c685706835e85f40d48e78f9ee45/dist/script/R/run.R#L20

For instance allow something like: devtools::install_github(repo = "garthtarr/pairsD3")

mayeulk commented 7 years ago

Also, summarized (and edited) from [https://coderwall.com/p/vuguzq/installing-r-packages-from-cran-bioconductor-omegahat-github]

install.packages("/home/trendwise/Downloads/R packages/RSPython_0.7-1.tar.gz",repos=NULL,lib=.libPaths()[1])

# installing biocLite
# required for downloading & installing Bioconductor packages
source("http://bioconductor.org/biocLite.R")
biocLite() # installs automatically 'Biobase' 'IRanges' 'AnnotationDbi' ‘BiocGenerics’ ‘RSQLite’
biocLite(c("GenomicFeatures", "AnnotationDbi"))

Note: does it make sense to allow to execute some code in the DesktopDeployR if some conditions is met, for eg installing something?

install.packages("devtools")
library(devtools)  # see [https://stackoverflow.com/questions/5595512/what-is-the-difference-between-require-and-library]
 install_github("rplos", "rOpenSci")
wleepang commented 7 years ago

These are great ideas. Package "ensure"-ing could potentially incorporate all of these options and handled by a small DSL in the packages.txt file.