parse.edge {QPress} | R Documentation |
Parse a text representation of (directed) edges, return the index of the directed edge within the edge list.
parse.edge(lines, edges)
lines |
a vector of strings representing directed edges |
edges |
an edge list |
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.
the indices of the directed edges within the edge list
## 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)