plot_deepdep: Main plot function for a 'deepdep' object

Description Usage Arguments Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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 Dec. 20, 2021, 5:08 p.m.