flow | R Documentation |
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.
flow(object, from, horizontal = TRUE, equalize = TRUE, minCurve = 1, maxCurve = 4,
unfadeFirst = FALSE, fade = TRUE, labels, ...)
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 |
labels |
'labels' argument as used in |
... |
Arguments sent to qgraph |
Sacha Epskamp
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.