visualize_association_network: Interactive association network visualization

Description Usage Arguments Details Value Examples

View source: R/visualize_association_network.R

Description

Produces an interactive plot of nodes connected by edges scaled by the strength of association.

Usage

1
2
3
4
5
6
7
8
visualize_association_network(
  association_pairs,
  node_info,
  measure_title = "association",
  alphaDecay = 0.01,
  n_neighbors = 5,
  warn_of_mismatches = TRUE
)

Arguments

association_pairs

dataframe with columns a and b representing the ids of the variables or nodes and columns strength that is a numeric indicator of strength of association (higher = stronger).

node_info

Optional dataframe that has a column id that corresponds to the variables codded in a and b of association_pairs that contains additional info nade available on hover in visualization.

measure_title

Name of measure used to quantify strength of association between the variables.

alphaDecay

Paramter to control how fast the force-layout converges. Lower values mean a better but slower layout, higher means faster. See the d3-force docs for more info.

n_neighbors

How many neighbors for a hovered node should be shown?

warn_of_mismatches

If there are differences in the ids present in association_pairs and node_info should a warning be issued?

Details

The plot automatically detects isolated subgraphs (groups of nodes with connections only within the group) and lays them out in a grid to avoid overlap between unrelated parts of the network.

Value

Interactive javascript visualization of association network

Examples

1
2
virus_associations <- head(dplyr::arrange(virus_net, dplyr::desc(strength)), 300)
visualize_association_network(virus_associations)

nstrayer/entropynet documentation built on Oct. 12, 2020, 2:20 a.m.