R/loadpkg.R

Defines functions loadpkg

loadpkg <- function(pkg){
  tryCatch(getNamespace(pkg), error = function(e) {
    stop("Required package ", pkg, " not found. Please run: install.packages('", pkg, "')",
      call. = FALSE)
  })
}

Try the jsonlite package in your browser

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

jsonlite documentation built on June 22, 2024, 11:05 a.m.