plot.cranly_network: Interactive visualization of a package or author...

View source: R/plot_network.R

plot.cranly_networkR Documentation

Interactive visualization of a package or author cranly_network

Description

Interactive visualization of a package or author cranly_network

Usage

## S3 method for class 'cranly_network'
plot(
  x,
  package = Inf,
  author = Inf,
  directive = c("imports", "suggests", "enhances", "depends", "linking_to"),
  base = TRUE,
  recommended = TRUE,
  exact = TRUE,
  global = TRUE,
  physics_threshold = 200,
  height = NULL,
  width = NULL,
  dragNodes = TRUE,
  dragView = TRUE,
  zoomView = TRUE,
  legend = TRUE,
  title = TRUE,
  plot = TRUE,
  ...
)

Arguments

x

a cranly_network object.

package

a vector of character strings with the package names to be matched. Default is Inf which returns all available packages in x for further subsetting.

author

a vector of character strings with the author names to be matched. Default is Inf which returns all available author in x for further subsetting.

directive

a vector of at least one of "Imports", "Suggests", "Enhances", "Depends".

base

logical. Should we include base packages in the subset? Default is TRUE.

recommended

logical. Should we include recommended packages in the subset? Default is TRUE.

exact

logical. Should we use exact matching? Default is TRUE.

global

logical. If TRUE (default) the network summary statistics are computed on object, otherwise, on the subset of object according to package, author, directive, base, recommended.

physics_threshold

integer. How many nodes before switching off physics simulations for edges? Default is 200. See, also visNetwork::visEdges().

height

: Height (optional, defaults to automatic sizing)

width

: Width (optional, defaults to automatic sizing)

dragNodes

logical. Should the user be able to drag the nodes that are not fixed? Default is TRUE.

dragView

logical. Should the user be able to drag the view around? Default is TRUE.

zoomView

logical. Should the user be able to zoom in? Default is TRUE.

legend

logical. Should a legend be added on the resulting visualization? Default is TRUE.

title

logical. Should a title be added on the resulting visualization? Default is TRUE.

plot

logical. Should the visualization be returned? Default is TRUE.

...

currently not used.

Examples


cran_db <- clean_CRAN_db()
package_network <- build_network(cran_db)

## The package directives network of all users with Ioannis in
## their name from the CRAN database subset crandb
plot(package_network, author = "Ioannis", exact = FALSE)
## The package directives network of "Achim Zeileis"
plot(package_network, author = "Achim Zeileis")

author_network <- build_network(cran_db, perspective = "author")
plot(author_network, author = "Ioannis", exact = FALSE, title = TRUE)


cranly documentation built on Aug. 27, 2022, 1:07 a.m.