Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sg_relative_size

Relative node sizes


Description

Change nodes size depending to their degree (number of relationships)

Usage

sg_relative_size(sg, initial = 1)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

initial

Initial node size.

Value

A modified version of the sg object.

Examples

nodes <- sg_make_nodes(50)
edges <- sg_make_edges(nodes, 100)

sigmajs() %>%
  sg_nodes(nodes, id, label) %>% # no need to pass size
  sg_edges(edges, id, source, target) %>% 
  sg_relative_size()

sigmajs

Interface to 'Sigma.js' Graph Visualization Library

v0.1.5
MIT + file LICENSE
Authors
John Coene [aut, cre, cph] (<https://orcid.org/0000-0002-6637-4107>)
Initial release
2020-06-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.