R/ensure_devtools.R

Defines functions ensure_devtools

Documented in ensure_devtools

#' Ensure devtools are installed
#' 
#' @export
#' 
#' @examples
#' library(statshelpR)
#' ensure_devtools()
ensure_devtools <- function(){
  str.cran.repo <- 'http://cran.revolutionanalytics.com/'
  str.lib <- .Library
  if ("devtools" %in% installed.packages()){
    print('devtools already installed')
  }else{
    install.packages("devtools",repos=str.cran.repo,
                     dep=TRUE,lib=str.lib)
    print('devtools installed')
    
  }
}
jrminter/statshelpR documentation built on May 2, 2020, 12:08 a.m.