Learn R Programming

gRapfa (version 1.0)

MergeNodes: Merge given node set of an APFA

Description

Merges two nodes (at the same level) in an APFA, returning the resulting APFA.

Usage

MergeNodes(G, nodeset, NS = NULL, setLayout = TRUE)

Arguments

G
G is an APFA object.
nodeset
nodeset is a vector of vertex names or nodes of length two, which are to be merged.
NS
NS is the node by symbol array for G. Supplying this will speed the computations.
setLayout
If setLayout=TRUE sets XY coordinates for the graph

Value

Returns the APFA igraph object after merging.

Details

If necessary, more details than the description above.

See Also

merge2nodes

Examples

Run this code
library(gRapfa)
data(Wheeze)
G <- st(Wheeze)
G.c <- contract.last.level(G)
G.m <- MergeNodes(G.c, c(5,3))

Run the code above in your browser using DataLab