multiple_network_plot: Plots networks for multiple conditions

View source: R/multiple_network_plot.R

multiple_network_plotR Documentation

Plots networks for multiple conditions

Description

The function takes multiple network objects and plots them next to each other while keeping the element positions etc constant. Uses ggraph function

Usage

multiple_network_plot(netfacs.graphs, sig.level = 0.01, sig.nodes.only = FALSE)

multiple.network.plot(netfacs.graphs, sig.level = 0.01, sig.nodes.only = FALSE)

Arguments

netfacs.graphs

List of network objects resulting from netfacs_multiple function or multiple_netfacs_network function

sig.level

Numeric between 0 and 1. P value used to determine whether nodes are significant. Default = 0.01.

sig.nodes.only

Logical. Should only nodes that were significant in _at least_ one of the networks be included in the plots? Default = FALSE.

Value

Function returns a ggraph plot showing connections between nodes in the different networks. Elements that are significantly more likely to occur than expected are large, non-significant elements are small, and absent elements are absent.

Examples

data(emotions_set)
emo.faces <- netfacs_multiple(
  data = emotions_set[[1]],
  condition = emotions_set[[2]]$emotion,
  duration = NULL,
  ran.trials = 10, # only for example
  control = NULL,
  random.level = NULL,
  combination.size = 2
)

emo.nets <- multiple_netfacs_network(emo.faces, min.count = 5)
multiple_network_plot(emo.nets)

NetFACS documentation built on Dec. 7, 2022, 1:12 a.m.