plot.pkgdepR | R Documentation |
This function is a simple wrapper for plotting a network visualization using visNetwork.
## S3 method for class 'pkgdepR'
plot(
x,
width = NULL,
height = NULL,
main = NULL,
submain = NULL,
alpha = 0.8,
footer = NULL,
background = "rgba(0, 0, 0, 0)",
n,
m,
...
)
x |
An object of class |
width |
The width of the |
height |
The height of the |
main |
The title. To remove the title, pass |
submain |
The subtitle. To remove the subtitle, pass |
alpha |
A transparency value to use for colors. Must be between 0 and 1. |
footer |
A character or a named list. See visNetwork. |
background |
A background color. See visNetwork. |
n |
(Optional) The number of colours to request from viridis. Allows the user to set a more granular palette. |
m |
(Optional) The subset of colours of the custom palette (specified by |
... |
Other arguments passed onto viridis. |
An object of classes visNetwork
and htmlwidget
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.