| PnetFindNode | R Documentation |
The function PnetFindNode finds a node in a
Pnet with the given name. If no node with the
specified name found, it will return NULL.
PnetFindNode(net, name)
net |
The |
name |
A character vector giving the name or names of the desired nodes. |
Although each Pnode belongs to a single network, a
network contains many nodes. Within a network, a node is uniquely
identified by its name. However, nodes can be renamed (see
PnodeName()).
The Pnode object or list of Pnode
objects corresponding to names,
Russell Almond
Pnode, Pnet
PnodeNet retrieves the network for the node.
## Not run:
library(PNetica) # Requires PNetica
sess <- NeticaSession()
startSession(sess)
tnet <- CreateNetwork("TestNet",sess)
nodes <- NewDiscreteNode(tnet,c("A","B","C"))
nodeA <- PnetFindNode(tnet,"A")
stopifnot (nodeA==nodes[[1]])
nodeBC <- PnetFindNode(tnet,c("B","C"))
stopifnot(nodeBC[[1]]==nodes[[2]])
stopifnot(nodeBC[[2]]==nodes[[3]])
DeleteNetwork(tnet)
stopSession(sess)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.