plot_deepdep: Main plot function for a 'deepdep' object

plot_dependenciesR Documentation

Main plot function for a deepdep object

Description

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

Usage

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

## Default S3 method:
plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  show_stamp = TRUE,
  declutter = FALSE,
  ...
)

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

## S3 method for class 'deepdep'
plot_dependencies(
  x,
  type = "circular",
  same_level = FALSE,
  reverse = FALSE,
  label_percentage = 1,
  show_version = FALSE,
  show_downloads = FALSE,
  show_stamp = TRUE,
  declutter = 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.

show_stamp

A logical. If TRUE (the default) the package version and plot creation time will be added

declutter

A logical. If TRUE then all layers beyond the first one ignore non-strong dependencies (i.e. "Suggests" and "Enhances"). This visualizes the so-called "hard costs of weak suggests".

...

Other arguments passed to the deepdep function.

Value

A ggplot2, gg, ggraph, deepdep_plot class object.

Examples



library(deepdep)

#:# use local packages
plot_dependencies("deepdep", depth = 2, local = TRUE)

dd <- deepdep("ggplot2")
plot_dependencies(dd, "tree")

dd2 <- deepdep("ggplot2", depth = 2)
plot_dependencies(dd2, "circular")

#:# show grand_total download count
plot_dependencies("shiny", show_downloads = TRUE)



deepdep documentation built on June 22, 2024, 12:23 p.m.