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 (>= 3.5.0)
#>   Imports:     digest
#>   Imports:     httr
#>   Imports:     versionsort (>= 1.1.0)
#>   Suggests:    covr
#>   Suggests:    httptest
#>   Suggests:    testthat (>= 3.0.0)
#>   Suggests:    usethis
#>   Suggests:    vcr
#>   Suggests:    withr
#>   Suggests:    xml2
wood_local_dependencies("httr", paths = "all")
#> <dependencies>
#>   Depends:     R (>= 3.5)
#>   Imports:     curl (>= 3.0.0)
#>   Imports:     jsonlite
#>   Imports:     mime
#>   Imports:     openssl (>= 0.8)
#>   Imports:     R6
#>   Suggests:    covr
#>   Suggests:    httpuv
#>   Suggests:    jpeg
#>   Suggests:    knitr
#>   Suggests:    png
#>   Suggests:    readr
#>   Suggests:    rmarkdown
#>   Suggests:    testthat (>= 0.8.0)
#>   Suggests:    xml2