Skip to contents

This function extracts dependencies of the selected package, searching through specified library paths.

Usage

wood_local_dependencies(package, paths = .libPaths()[1])

Arguments

package

character(1)
Name of a package to query for.

paths

character()
Paths to local libraries, by default the first element of .libPaths(). If equal to "all", uses all elements of .libPaths().

Value

A data frame with three columns, all in string format:

  • package (package name),

  • version (minimum version requirement or NA if none),

  • type (dependency type, e.g. "Imports").

Examples

wood_local_dependencies("woodendesc")
#> <dependencies>
#>   Depends:     R (>= 4.1.0)
#>   Imports:     httr2 (>= 1.0.0)
#>   Imports:     rlang (>= 1.0.0)
#>   Imports:     utils
#>   Imports:     versionsort (>= 1.1.0)
#>   Suggests:    covr
#>   Suggests:    httptest2
#>   Suggests:    knitr
#>   Suggests:    rmarkdown
#>   Suggests:    testthat (>= 3.0.0)
#>   Suggests:    usethis
#>   Suggests:    withr
#>   Suggests:    xml2
wood_local_dependencies("httr2", paths = "all")
#> <dependencies>
#>   Depends:     R (>= 4.0)
#>   Imports:     cli (>= 3.0.0)
#>   Imports:     curl (>= 6.1.0)
#>   Imports:     glue
#>   Imports:     lifecycle
#>   Imports:     magrittr
#>   Imports:     openssl
#>   Imports:     R6
#>   Imports:     rappdirs
#>   Imports:     rlang (>= 1.1.0)
#>   Imports:     vctrs (>= 0.6.3)
#>   Imports:     withr
#>   Suggests:    askpass
#>   Suggests:    bench
#>   Suggests:    clipr
#>   Suggests:    covr
#>   Suggests:    docopt
#>   Suggests:    httpuv
#>   Suggests:    jose
#>   Suggests:    jsonlite
#>   Suggests:    knitr
#>   Suggests:    later (>= 1.4.0)
#>   Suggests:    paws.common
#>   Suggests:    promises
#>   Suggests:    rmarkdown
#>   Suggests:    testthat (>= 3.1.8)
#>   Suggests:    tibble
#>   Suggests:    webfakes
#>   Suggests:    xml2