parse.edge: Indices of (Directed) Edges

View source: R/text.R

parse.edgeR Documentation

Indices of (Directed) Edges

Description

Parse a text representation of (directed) edges, return the index of the directed edge within the edge list.

Usage

parse.edge(lines, edges)

Arguments

lines

a vector of strings representing directed edges

edges

an edge list

Details

Each directed edge is represented as a string consisting of two node labels separated by an arrow, where the arrow consists of a sequence of dashes "-" followed by one of the character sequences ">","*","<>". The number of dashes used in the arrow is ignored.

Value

the indices of the directed edges within the edge list

Examples

## Sample model
edges <- parse.digraph(c(
  "E *-> D",
  "D *-> C",
  "C -> E",
  "E *-> B",
  "B *-> A",
  "A -> E",
  "D --> B"))
edges <- enforce.limitation(edges)
parse.edge(c("E->D","D-*E","A-*B"),edges)

SWotherspoon/QPress documentation built on Sept. 26, 2022, 2:27 a.m.