cnReorderNodes-method {sdnet} | R Documentation |
The function rearranges the nodes of a network according to a new order.
cnReorderNodes(object, nodeIndices)
object |
a |
nodeIndices |
a |
Node reordering affects the list of node names, parents and probabilities. It is a useful operation in cases when comparison of two networks is needed.
A catNetwork
object.
N. Balov
cnet <- cnRandomCatnet(numnodes=10, maxpars=3, numcats=2) cnMatParents(cnet) cnet1 <- cnReorderNodes(object=cnet, nodeIndices=cnOrder(cnet)) cnNodes(object=cnet1) cnMatParents(cnet1)