R/install.R

Defines functions install

Documented in install

#' Install packages for a project
#'
#' @param deployment Use deployment mode
#' @return No return value
#' @export
#' @examples \dontrun{
#'
#' jetpack::install()
#' }
install <- function(deployment=FALSE) {
  sandbox({
    if (deployment) {
      status <- getStatus()
      missing <- getMissing(status)
      if (length(missing) > 0) {
        stop(paste("Missing packages:", paste(missing, collapse=", ")))
      }
      verboseRenv(suppressWarnings(renv::restore(prompt=FALSE)))
      showStatus(status)
    } else {
      installHelper(show_status=TRUE)
    }

    success("Pack complete!")
  })
}

Try the jetpack package in your browser

Any scripts or data that you put into this service are public.

jetpack documentation built on Oct. 31, 2022, 5:07 p.m.