plotdstr: Plot Dependency Structure

Description Usage Arguments Note Examples

View source: R/plotdstr.R

Description

This function plots the dependency structur of one or more packages. The default assumption is that there is an R package in the current working directory and that the dependencies to be analyzed are given in the DESCRIPTION file. Use the parameters <e2><80><98>githublink<e2><80><99> and/or 'pkg' to alter the package/s to be analyzed.

Usage

1
2
plotdstr(githublink = NULL, pkg = NULL, includebasepkgs = F,
  recursive = T, includerootpkg = T)

Arguments

githublink

A link to a github repository of an R package.

pkg

Character vector of CRAN package name/s you want to see the dependencies of. In the case that githublink is also set, the github package is considered as the root package and the packages provided by the pkg parameter are considered to be first level packages, e.g. on the same level as the packages in the DESCRIPTION file of the github package. This is to help answer the question "How would the dependency structure change if the package on github would also depend on a few more packages (provided by the pkg parameter)?".

includebasepkgs

Whether to include base packages in the analysis.

recursive

show dependencies of dependencies.

includerootpkg

Whether to include the root package in the plot.

Note

The graph is created by using the Fruchterman-Reingold-Algorithm. A problem for those graphs can be overlapping of the vertex labels. If this is the case the authors suggest to use dstr_data for creating either a network object which layout options can be modified for plotting or an edgelist, which can be used in combination with other packages such 'qgraph' or 'ggnet2'.

Examples

1
2
plotdstr(githublink = "tidyverse/ggplot2",
      pkg = c("astro", "celestial"))

falo0/dstr documentation built on May 25, 2019, 4:26 p.m.