NodeTitle {RNetica} | R Documentation |
The title is a longer name for a node which is not subject to the
Netica IDname
restrictions. The description is a free form
text associated with a node.
NodeTitle(node) NodeTitle(node) <- value NodeDescription(node) NodeDescription(node) <- value
node |
A |
value |
A character object giving the new title or description. |
The title is meant to be a human readable alternative to the name,
which is not limited to the IDname
restrictions. The
title also affects how the node is displayed in the Netica GUI.
The description is any text the user chooses to attach to the node. If value has length greater than 1, the vector is collapsed into a long string with newlines separating the components.
A character vector of length 1 providing the title or description.
Node descriptions are called "Descriptions" in the Netica GUI, but "Comments" in the API.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: GetNodeTitle_bn(), SetNodeTitle_bn(), GetNodeComments_bn(), SetNodeComments_bn()
sess <- NeticaSession() startSession(sess) net2 <- CreateNetwork("secondNet", session=sess) firstNode <- NewDiscreteNode(net2,"firstNode") NodeTitle(firstNode) <- "My First Bayesian Network Node" stopifnot(NodeTitle(firstNode)=="My First Bayesian Network Node") now <- date() NodeDescription(firstNode)<-c("Node created on",now) stopifnot(NodeDescription(firstNode) == paste(c("Node created on",now),collapse="\n")) ## Print here escapes the newline, so is harder to read cat(NodeDescription(firstNode),"\n") DeleteNetwork(net2) stopSession(sess)