Description Usage Arguments Value See Also Examples

Create edge weights to modify the shortest path search
(`find_paths`

). Discourage and/or encourage certain types of paths
by supplying `_out`

and `_in`

arguments, respectively. Node
semantic types, node names, and edge predicates are the features that
can influence the edge weights. Capitalization is ignored.

1 2 3 4 5 6 7 8 9 10 |

`graph` |
The SemMed graph |

`e_feat` |
A |

`node_semtypes_out` |
A character vector of semantic types to exclude from shortest paths. |

`node_names_out` |
A character vector of exact node names to exclude. |

`edge_preds_out` |
A character vector of edge predicates to exclude. |

`node_semtypes_in` |
A character vector of semantic types to include/encourage in shortest paths. |

`node_names_in` |
A character vector of exact node names to include. |

`edge_preds_in` |
A character vector of edge predicates to include. |

A numeric vector of weights

`find_paths`

, `get_middle_nodes`

for a
way to obtain node names to remove

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
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)
e_feat <- get_edge_features(g_mini)
w1 <- make_edge_weights(g_mini, e_feat, edge_preds_in = "COEXISTS_WITH")
paths1 <- find_paths(g_mini,
from = node_cortisol, to = node_stress, weights = w1)
w2 <- make_edge_weights(g_mini, e_feat, edge_preds_in = "ISA",
node_names_out = "Stress")
paths2 <- find_paths(g_mini,
from = node_cortisol, to = node_stress, weights = w2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.