Skip to content
Back to skills

VisNetwork

ASecurity

R visNetwork package for network visualization. Use for interactive network graphs with vis.js.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
datanode

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill visNetwork --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of VisNetwork?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for VisNetwork
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-visnetwork/badge)](https://www.skillsdirectory.com/skills/leolin990405-visnetwork)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: visNetwork
description: R visNetwork package for network visualization. Use for interactive network graphs with vis.js.
---

# visNetwork Package

Interactive network visualization with vis.js.

## Basic Network

```r
library(visNetwork)

nodes <- data.frame(
  id = 1:5,
  label = c("A", "B", "C", "D", "E")
)

edges <- data.frame(
  from = c(1, 1, 2, 3),
  to = c(2, 3, 4, 5)
)

visNetwork(nodes, edges)
```

## Node Styling

```r
nodes <- data.frame(
  id = 1:5,
  label = LETTERS[1:5],
  color = c("red", "blue", "green", "yellow", "purple"),
  size = c(20, 30, 25, 35, 15),
  shape = c("dot", "square", "triangle", "star", "diamond"),
  group = c("A", "A", "B", "B", "C")
)

visNetwork(nodes, edges) %>%
  visGroups(groupname = "A", color = "red") %>%
  visGroups(groupname = "B", color = "blue")
```

## Edge Styling

```r
edges <- data.frame(
  from = c(1, 1, 2),
  to = c(2, 3, 4),
  arrows = "to",
  dashes = c(TRUE, FALSE, FALSE),
  width = c(1, 2, 3),
  color = c("red", "blue", "green")
)
```

## Interactivity

```r
visNetwork(nodes, edges) %>%
  visOptions(
    highlightNearest = TRUE,
    nodesIdSelection = TRUE,
    selectedBy = "group"
  ) %>%
  visInteraction(
    navigationButtons = TRUE,
    keyboard = TRUE
  )
```

## Layout

```r
visNetwork(nodes, edges) %>%
  visLayout(randomSeed = 123) %>%
  visPhysics(stabilization = FALSE)

# Hierarchical
visNetwork(nodes, edges) %>%
  visHierarchicalLayout(direction = "UD")
```

## From igraph

```r
library(igraph)
g <- make_ring(10)
visIgraph(g)
```

## Events

```r
visNetwork(nodes, edges) %>%
  visEvents(
    select = "function(nodes) {
      Shiny.onInputChange('selected', nodes.nodes);
    }"
  )
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…