flow: Draws network as a flow diagram showing how one node is...

View source: R/vein.R

flowR Documentation

Draws network as a flow diagram showing how one node is connected to all other nodes

Description

This function will draw one node of interest on the left, then subsequently draw all other nodes in vertical levels to the right, in the order of direct (unweighted) connectiveness to the node of interest. Layout is based on the layout_as_tree function from the igraph package. This allows one to see how one node connects to other nodes in the network.

Usage

flow(object, from, horizontal = TRUE, equalize = TRUE, minCurve = 1, maxCurve = 4, 
      unfadeFirst = FALSE, fade = TRUE, labels, ...)

Arguments

object

A qgraph object

from

Integer or character indicating the (label of the) node of interest.

horizontal

Logical, should the flow diagram be plotted horizontally or vertically

equalize

Logical, should the placement of nodes be equalized per level.

minCurve

Minimum curve of edges on the same level

maxCurve

Maximum curve of edges on the same level

unfadeFirst

Logical, should edges between the node of interest be unfaded?

fade

'fade' argument as used in qgraph

labels

'labels' argument as used in qgraph

...

Arguments sent to qgraph

Author(s)

Sacha Epskamp

Examples

## Not run: 
# Load data:
library("psych")
data(bfi)

# Compute polychoric correlations:
corMat <- cor_auto(bfi[,1:25])

# Glasso network:
g2 <- qgraph(corMat,  cut = 0, graph = "glasso", sampleSize = nrow(bfi),
             threshold = TRUE)

# Flow from A2:
flow(g2, "A2", horizontal = TRUE)

## End(Not run)

qgraph documentation built on Nov. 3, 2023, 5:07 p.m.

Related to flow in qgraph...