summarize_predicates: Summarize predicates

Description Usage Arguments Details Value See Also Examples

View source: R/summarize.R

Description

Summarize the predicates present in a collection of paths

Usage

1
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

1
2
3
4
5
6
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)

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