Created
October 12, 2016 07:01
-
-
Save rkingdc/852bbe324894bc8d29e216c1213c04f6 to your computer and use it in GitHub Desktop.
script to install the Agroft R package, if all other options fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# non https server re-direct server (in case R is pre 3.2.0) | |
r <- 'http://cloud.r-project.org/' | |
# all required packages+ghit | |
pkgs <- c("shiny", "shinyAce", "shinyBS", "knitr", "car", "yaml", "nlme", | |
"lsmeans", "multcompView", 'ghit') | |
# install binary dependencies | |
install.packages(pkgs, repos = r) | |
# build just agroft from github | |
ghit::install_github('ucd-ipo/agroft', dependencies=FALSE) | |
# check if it worked and tell the user what to do next. | |
# if it worked, a new agroft session will open | |
# otherwise, message about opening an issue | |
if(!require(agroft)) { | |
cat('Installation Failed. Contact the developer for help by opening an issue at https://github.com/ucd-ipo/agroft/issues') | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment