summarize_predicates {rsemmed} | R Documentation

## Summarize predicates

### Description

Summarize the predicates present in a collection of paths

### Usage

    summarize_predicates(graph, object, print = TRUE)

### Arguments

`graph` | The SemMed graph
`object` | A vertex sequence (`igraph.vs`), a list of vertex sequences, or a list of vertex sequence lists
`print` | If `TRUE`, information on predicates will be printed to the screen.

### Details

Because predicates are edge features, it is assumed that by using `summarize_predicates` the nodes contained in `object` are ordered (paths). This is why `summarize_semtypes` has the `is_path` argument, but `summarize_predicates` does not. `summarize_predicates` tabulates edge predicates across paths corresponding to each `from`-`to` pair in `object`.

### Value

A `tbl` where each row corresponds to a `from`-`to` pair in `object`. The last column is a list-column containing `table`'s of predicate counts.

### See Also

`summarize_semtypes` for tabulating semantic types of nodes in paths or other node collections

### Examples

    data(g_mini)

    node_cortisol <- find_nodes(g_mini, "Serum cortisol")
    node_stress <- find_nodes(g_mini, "Chronic Stress")
    paths <- find_paths(g_mini, from = node_cortisol, to = node_stress)
    summarize_predicates(g_mini, paths)

[Package rsemmed version 1.4.0 Index]