Prints the dependencies of the root component as a tree. A component
reached by several paths is expanded the first time it appears and marked
(see above) afterwards. A version that is only a minimum, such as R's
lowest stated version when R is not the one running, is shown as (>= x).
Components reached only through Suggests are
marked (suggested), and the code a package carries inside it (its
LinkingTo packages, vendored C and C++ libraries and bundled JavaScript)
is marked (embedded). Files that the root contains are leaves labeled
with their path.
Arguments
- x
An
<sbom>object, as returned bysbom_package()orsbom_installed().- max_depth
The number of levels below the root to show. Components at the limit are shown but not expanded.
Examples
x <- sbom_package(system.file("DESCRIPTION", package = "sbom"), system = FALSE)
sbom_tree(x)
#> sbom 0.1.0
#> ├─R 4.6.2
#> │ ├─methods 4.6.2
#> │ └─utils 4.6.2
#> ├─cli 3.6.6
#> │ ├─R 4.6.2 (see above)
#> │ └─utils 4.6.2 (see above)
#> ├─curl 8.1.0 (suggested)
#> ├─htmltools 0.5.9 (suggested)
#> ├─jsonlite 2.0.0
#> │ └─methods 4.6.2 (see above)
#> ├─jsonvalidate 1.5.0 (suggested)
#> ├─knitr 1.52 (suggested)
#> ├─pak 0.11.2 (suggested)
#> ├─quarto 1.5.1 (suggested)
#> ├─renv 1.3.1
#> │ └─utils 4.6.2 (see above)
#> ├─rmarkdown 2.32 (suggested)
#> ├─testthat 3.3.2 (suggested)
#> ├─utils 4.6.2 (see above)
#> ├─withr 3.0.3 (suggested)
#> ├─xml2 1.6.0
#> │ ├─R 4.6.2 (see above)
#> │ ├─cli 3.6.6 (see above)
#> │ ├─methods 4.6.2 (see above)
#> │ └─rlang 1.3.0
#> │ ├─R 4.6.2 (see above)
#> │ └─utils 4.6.2 (see above)
#> └─yaml 2.3.12 (suggested)
sbom_tree(x, max_depth = 1)
#> sbom 0.1.0
#> ├─R 4.6.2
#> ├─cli 3.6.6
#> ├─curl 8.1.0 (suggested)
#> ├─htmltools 0.5.9 (suggested)
#> ├─jsonlite 2.0.0
#> ├─jsonvalidate 1.5.0 (suggested)
#> ├─knitr 1.52 (suggested)
#> ├─pak 0.11.2 (suggested)
#> ├─quarto 1.5.1 (suggested)
#> ├─renv 1.3.1
#> ├─rmarkdown 2.32 (suggested)
#> ├─testthat 3.3.2 (suggested)
#> ├─utils 4.6.2
#> ├─withr 3.0.3 (suggested)
#> ├─xml2 1.6.0
#> └─yaml 2.3.12 (suggested)