Getting started
Installation
You can install the released version of pkgdepR
from CRAN with:
install.packages("pkgdepR")
And the development version from GitHub with:
devtools::install_github("edpeyton/pkgdepR")
You can install the released version of pkgdepR
from CRAN with:
install.packages("pkgdepR")
And the development version from GitHub with:
devtools::install_github("edpeyton/pkgdepR")
Here we’ll show an example of how to use pkgdepR
.
First, let’s load the required packages.
The required packages have now been added to the search path.
Create a pkgdepR
object as follows:
v = pkgdepR::deps(pkg = "pkgdepR")
We can see a summary of the object
v
#>
#> pkgdepR object
#> ------------------------------
#> Packages: pkgdepR
#> Total nodes: 16
#> Total links: 17
#> -Between packages: 0
#> -Within packages: 17
#> --Between functions: 16
#> --Self-referential: 1
To see the network visualization, simply call plot.
Visualizing multiple packages works in a similar way.
v
#>
#> pkgdepR object
#> ------------------------------
#> Packages: pkgdepR, magrittr
#> Total nodes: 64
#> Total links: 30
#> -Between packages: 6
#> -Within packages: 24
#> --Between functions: 23
#> --Self-referential: 1
It’s as simple as that!