pkgdepR
pkgdepR.Rmd
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")
How to use
Here we’ll show an example of how to use {pkgdepR}
using some test packages that are hosted on GitHub.
First, let’s load the required example packages.
The required packages have now been added to the search path.
Single package
Create a pkgdepR
object as follows:
v = pkgdepR::deps(pkg = "pkgdepR")
We can see a summary of the object
v # alternatively, summary(v) or print(v)
#>
#> pkgdepR object
#> ------------------------------
#> Packages: pkgdepR
#> Total nodes: 15
#> Total links: 18
#> -Between packages: 0
#> -Within packages: 18
#> --Between functions: 17
#> --Self-referential: 1
To see the network visualization, simply call plot.
Multiple packages
Visualizing multiple packages works in a similar way.
v # alternatively, summary(v) or print(v)
#>
#> pkgdepR object
#> ------------------------------
#> Packages: pkgdepR, magrittr
#> Total nodes: 67
#> Total links: 48
#> -Between packages: 7
#> -Within packages: 41
#> --Between functions: 39
#> --Self-referential: 2
It’s as simple as that!