Learn R Programming

qgraph (version 1.9.2)

flow: 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

Sacha Epskamp

Examples

Run this code
if (FALSE) {
# 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)
}

Run the code above in your browser using DataLab