text_path {rsemmed} | R Documentation

## Display path (text form)

### Description

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.)

### Usage

    text_path(graph, path, print = TRUE)

### Arguments

`graph` | The SemMed graph
`path` | A vertex sequence (`igraph.vs`) (the path to display)
`print` | Print the path to screen?

### Details

`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.

### Value

Invisibly returns a list of predications for each pair of nodes along the path.

### See Also

`plot_path` for plotting paths

### Examples

    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)

[Package rsemmed version 1.4.0 Index]