File: loadpkg.R

package info (click to toggle)
r-cran-jsonlite 1.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: ansic: 3,792; sh: 9; makefile: 6
file content (6 lines) | stat: -rw-r--r-- 198 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
loadpkg <- function(pkg){
  tryCatch(getNamespace(pkg), error = function(e) {
    stop("Required package ", pkg, " not found. Please run: install.packages('", pkg, "')",
      call. = FALSE)
  })
}