Visualize dependency data from a deepdep object using ggplot2 and ggraph packages. Several tree-like layouts are available.

plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  ...
)

# S3 method for default
plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  ...
)

# S3 method for character
plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  ...
)

# S3 method for deepdep
plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  ...
)

Arguments

x

A deepdep object or a character package name.

type

A character. Possible values are circular and tree.

same_level

A logical. If TRUE links between dependencies on the same level will be added. By default it's FALSE.

reverse

A logical. If TRUE links between dependencies pointing from deeper level to more shallow level will be added. By default it's FALSE.

label_percentage

A numeric value between 0 and 1. A fraction of labels to be displayed. By default it's 1 (all labels displayed).

show_version

A logical. If TRUE required version of package will be displayed below package name. Defaults to FALSE.

show_downloads

A logical. If TRUE total number of downloads of packages will be displayed below package names. Defaults to FALSE.

...

Other arguments passed to the deepdep function.

Value

A ggplot2, gg, ggraph, deepdep_plot class object.

Examples

library(deepdep) dd <- deepdep("ggplot2") plot_dependencies(dd, "tree")
dd2 <- deepdep("ggplot2", depth = 2) plot_dependencies(dd2, "circular")
# \donttest{ #:# use local packages plot_dependencies("deepdep", depth = 2, local = TRUE)
#:# show grand_total download count plot_dependencies("deepdep", show_downloads = TRUE)
# }