plot_path: Display path (plot form)

Description Usage Arguments Details Value See Also Examples

View source: R/display.R

Description

Plot the graph form of a path

Usage

1
plot_path(graph, path)

Arguments

graph

The SemMed graph

path

A vertex sequence (igraph.vs) (the path to display)

Details

All connections among nodes along the supplied path are plotted with nodes labeled with their name and edges labeled with their predicate.

Value

A plot is created on the current graphics device

See Also

text_path for textual display of paths

Examples

1
2
3
4
5
6
data(g_mini)

node_cortisol <- find_nodes(g_mini, names = "Serum cortisol")
node_stress <- find_nodes(g_mini, names = "Chronic Stress")
paths <- find_paths(g_mini, from = node_cortisol, to = node_stress)
plot_path(g_mini, paths[[1]][[1]])

lmyint/rsemmed documentation built on July 26, 2021, 1:20 a.m.