Function adapted from 'itdepends::dep_usage_pkg' at https://github.com/r-lib/itdepends to obtain the functionality imported and used by a given package.
pkgDepImports(pkg)A tidy data frame with two columns:
pkg: name of the package dependency.
fun: name of the functionality call imported from the
the dependency in the column pkg and used within
the analyzed package.
Certain imported elements, such as built-in constants, will not be identified as imported functionality by this function.
pkgDepImports('BiocPkgTools')
#> # A tibble: 76 × 2
#>    pkg           fun                
#>    <chr>         <chr>              
#>  1 BiocFileCache BiocFileCache      
#>  2 BiocFileCache bfcnew             
#>  3 BiocFileCache bfcquery           
#>  4 BiocFileCache bfcrpath           
#>  5 BiocManager   containerRepository
#>  6 BiocManager   repositories       
#>  7 BiocManager   version            
#>  8 DT            datatable          
#>  9 RBGL          transitive.closure 
#> 10 curl          curl               
#> # ℹ 66 more rows