Skip to content

Instantly share code, notes, and snippets.

@wush978
Last active July 11, 2018 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wush978/63f50e0106dfb980a3db511695d541c6 to your computer and use it in GitHub Desktop.
Save wush978/63f50e0106dfb980a3db511695d541c6 to your computer and use it in GitHub Desktop.
argv <- commandArgs(TRUE)
pkgs <- strsplit(argv, ",")[[1]]
installed.pkgs <- dir(.libPaths()[1])
for(pkg in pkgs) {
if (pkg %in% installed.pkgs) next
utils::install.packages(pkg, lib = .libPaths()[1])
}
#! /bin/bash
ls .Rprofile || wget https://raw.githubusercontent.com/wush978/.Rprofile/master/.Rprofile
PKGS=Rcpp,amap,knitr,rmarkdown,fields,BH,dbscan
export MAKE="make -j"
(rm -rf supc || echo "no supc") && \
(rm -rf supc_* || echo "no supc_") && \
git clone ~/Project/supc && \
Rscript check-pkgs.R $PKGS && \
R CMD build --no-build-vignettes --no-manual supc && \
(ls supc_* | xargs R CMD check --no-vignettes --no-build-vignettes --ignore-vignettes --no-manual)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment