R/library.R

Defines functions lib_status_internal lib_status

Documented in lib_status

#' Status of packages in a library
#'
#' @param lib Path to library.
#' @return Data frame the contains data about the packages
#'   installed in the library.
#'   \eval{include_docs("pkgdepends", "docs/lib-status-return.rds")}

#' @export
#' @family library functions
#' @section Examples:
#' ```{asciicast lib-status-2}
#' lib_status(.Library)
#' ```

lib_status <- function(lib = .libPaths()[1]) {
  load_extra("pillar")
  remote(
    function(...) asNamespace("pak")$lib_status_internal(...),
    list(lib = lib))
}

## TODO: lib_check()
## Run the solver and make sure all packages in the library are fine

## TODO: lib_doctor()
## Check if packages can be loaded, also for broken DLL files on Windows
## Maybe this should be merged into lib_check().

## TODO: lib_update_status()

## TODO: lib_update()

## ----------------------------------------------------------------------

lib_status_internal <- function(lib) {
  pkgdepends::lib_status(lib)
}
r-lib/pkgman documentation built on Nov. 18, 2024, 2:23 p.m.