cnReorderNodes-method {catnet} | 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, P. Salzman
cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2) cnMatParents(cnet) cnet1 <- cnReorderNodes(object=cnet, nodeIndices=cnOrder(cnet)) cnNodes(object=cnet1) cnMatParents(cnet1)