network_plot: Plots a network object

View source: R/network_plot.R

network_plotR Documentation

Plots a network object

Description

Plots the network created using the netfacs_network function; for networks with clear clusterin of elements, clusters can get different colours

Usage

network_plot(
  netfacs.graph,
  title = "network",
  clusters = FALSE,
  plot.bubbles = FALSE,
  hide.unconnected = TRUE
)

network.plot(
  netfacs.graph,
  title = "network",
  clusters = FALSE,
  plot.bubbles = FALSE,
  hide.unconnected = TRUE
)

Arguments

netfacs.graph

igraph network object resulting from netfacs_network

title

string of the graph's main title

clusters

if TRUE, cluster_fast_greedy is used to establish possible clusters in the dataset

plot.bubbles

if TRUE, then the nodes in the network plots will be surrounded by bubbles; if FALSE, the edges connect the names directly

hide.unconnected

if TRUE, then the nodes that do not have any significant connections will be hidden in the plot

Value

Function returns a ggraph plot of the network, where the size of nodes indicates how often they occur on their own, and edges indicate significant co-occurrence between them

Examples

data(emotions_set)
angry.face <- netfacs(
  data = emotions_set[[1]],
  condition = emotions_set[[2]]$emotion,
  test.condition = "anger",
  ran.trials = 10,
  combination.size = 2
)

anger.net <- netfacs_network(
  netfacs.data = angry.face,
  link = "unweighted",
  significance = 0.01,
  min.count = 1
)

network_plot(anger.net,
             title = "Angry Faces",
             clusters = FALSE,
             plot.bubbles = TRUE)

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