Skip to content
Snippets Groups Projects
Commit 8a7f3926 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

add lib

parent 0e30332e
No related branches found
Tags 0.4.0
No related merge requests found
......@@ -2,3 +2,4 @@
^\.Rproj\.user$
^\TODO.md
^\NEW.md
lib/
File added
sourcedir <- file.path(getwd(),"lib")
### tidyselect
install.packages(file.path(sourcedir,"tidyselect_1.1.0.tar.gz"), repos=NULL, type='source')
### dplyr
install.packages(file.path(sourcedir,"Archive/glue/glue_1.3.2.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"lifecycle_0.2.0.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"magrittr_1.5.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"R6_2.4.1.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"rlang_0.4.7.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"tibble_3.0.3.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"tidyselect_1.1.0.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"blob_1.2.1.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"Archive/ellipsis/ellipsis_0.3.1.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"generics_0.0.2.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"Archive/vctrs/vctrs_0.3.0.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"Archive/dplyr/dplyr_1.0.0.tar.gz"), repos=NULL, type='source')
### tidyr
install.packages(file.path(sourcedir,"tidyr_0.8.3.tar.gz"), repos=NULL, type='source')
### friendlyts
install.packages(file.path(sourcedir,"timemanip-0.9.4.tar.gz"), repos=NULL, type='source')
install.packages(file.path(sourcedir,"friendlyts-0.3.1.tar.gz"), repos=NULL, type='source')
## docopt
install.packages(file.path(sourcedir,"docopt_0.6.1.tar.gz"), repos=NULL, type='source')
File added
## friendlyts
### tidyselect
wget --quiet https://cran.r-project.org/src/contrib/tidyselect_1.1.0.tar.gz
### dplyr
wget --quiet https://cran.r-project.org/src/contrib/Archive/glue/glue_1.3.2.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/lifecycle_0.2.0.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/magrittr_1.5.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/R6_2.4.1.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/rlang_0.4.7.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/tibble_3.0.3.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/tidyselect_1.1.0.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/blob_1.2.1.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/Archive/ellipsis/ellipsis_0.3.1.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/generics_0.0.2.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/Archive/vctrs/vctrs_0.3.0.tar.gz
wget --quiet https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_1.0.0.tar.gz
### tidyr
wget --quiet https://cran.r-project.org/src/contrib/Archive/tidyr/tidyr_0.8.3.tar.gz
### friendlyts
wget --quiet https://git.nilu.no/RSpaceTimeManip/timemanip/-/archive/0.9.4/timemanip-0.9.4.tar.gz
wget --quiet https://git.nilu.no/RfriendlyTS/friendlyts/-/archive/0.4.0/friendlyts-0.4.0.tar.gz
## docopt
wget --quiet https://cran.r-project.org/src/contrib/Archive/docopt/docopt_0.6.1.tar.gz
File added
File added
File added
File added
#!/usr/local/bin/Rscript
# Jean-Marie Lepioufle
# NILU - nilu.no
# 2020-08-14
# install
'install
Usage:
install.R pkg <pkg> branch <branch> dir <dir>
install.R (-h | --help)
install.R --version
Options:
-h --help Show this screen.
--version Show version.
Outcomes:
friendlyts: package friendlyts installed with the chosen version.
' -> doc
#library(docopt)
arguments <- docopt::docopt(doc, version = 'install version 0.0.1')
# arguments
pkg <- tryCatch({
res <- as.character(arguments$pkg)
res
}, error = function(err) {
print(paste("Error in argument 'pkg': ",err))
print("It will crash.")
})
branch <- tryCatch({
res <- as.character(arguments$branch)
res
}, error = function(err) {
print(paste("Error in argument 'branch': ",err))
print("It will crash.")
})
dir <- tryCatch({
res <- normalizePath(file.path(as.character(arguments$dir)),mustWork = FALSE)
res
}, error = function(err) {
print(paste("Error in argument 'dir': ",err))
print("It will crash.")
})
# install pkg
wd <- dirname(dirname(getwd()))
install.packages(file.path(dir,paste0(pkg,'-',branch,'.tar.gz')), repos=NULL, type='source')
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment