Learn R Programming

pkgdepR (version 1.0.0)

plot.pkgdepR: Visualizing package dependencies

Description

This function is a simple wrapper for plotting a network visualization using visNetwork.

Usage

# S3 method for pkgdepR
plot(
  x,
  width = NULL,
  height = NULL,
  main = NULL,
  submain = NULL,
  alpha = 0.8,
  ...
)

Arguments

x

An object of class pkgdepR.

width

The width of the vis.js render.

height

The height of the vis.js render.

main

The title. To remove the title, pass list(text = NULL).

submain

The subtitle. To remove the subtitle, pass list(text = NULL).

alpha

A transparency value to use for colors. Must be between 0 and 1.

...

Other arguments passed onto visNetwork and viridis.

Value

An object of classes visNetwork and htmlwidget.

Examples

Run this code
# NOT RUN {
library(pkgdepR)
deps(pkg = "pkgdepR") %>% plot(option = "E", direction = -1)
deps(pkg = "pkgdepR") %>% plot(option = "D", alpha = 0.5, main = list(text = NULL))
deps(pkg = "pkgdepR") %>% 
  plot(option = "D", alpha = 0.8, main = list(text = NULL)) %>% 
  visNetwork::visInteraction(dragNodes = FALSE)
# }

Run the code above in your browser using DataLab