network.plot: Plots a network object

Description Usage Arguments Value Examples

View source: R/network_plot.R

Description

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

Usage

1
2
3
4
5
6
7
network.plot(
  netfacs.graph,
  title = "network",
  clusters = TRUE,
  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 ggnet plot of the network, where the size of nodes indicates how often they occur on their own, and edges indicate significant co-occurrance between them

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
data(emotions_set)
angry.face <- netfacs(
  data = emotions_set[[1]],
  condition = emotions_set[[2]]$emotion,
  test.condition = "anger",
  ran.trials = 100,
  combination.size = 2
)

anger.net <- netfacs.network(
  netfacs.data = angry.face,
  link = "unweighted",
  significance = 0.01,
  min.count = 1,
  min.prob = 0,
  min.specificity = 0,
  ignore.element = NULL
)

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

AlexMielke1988/NetFACS documentation built on Oct. 27, 2020, 4:14 p.m.