text_path {rsemmed} | R Documentation |
Show a text display of a path and obtain output that can be used to explore predications along the path. (A predication is a SUBJECT–LINKING VERB–>OBJECT triple.)
text_path(graph, path, print = TRUE)
graph |
The SemMed graph |
path |
A vertex sequence ( |
print |
Print the path to screen? |
text_path
invisibly returns a list of tbl
's containing
information on the predications on the path. Each list element is a
tbl
that corresponds to a (sequential) pair of nodes along
the path. The tbl
contains information on the subject and
object node's name and semantic type as well as all predicates linking
the subject and object.
Invisibly returns a list of predications for each pair of nodes along the path.
plot_path
for plotting paths
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) text_path(g_mini, paths[[1]][[1]]) result <- text_path(g_mini, paths[[1]][[1]], print = FALSE)