PnodeTitle | R Documentation |
The title is a longer name for a node which is not subject to the naming restrictions. The description is a free form text associated with a node.
PnodeTitle(node)
PnodeTitle(node) <- value
PnodeDescription(node)
PnodeDescription(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 variable name restrictions (i.e., it can contain spaces and punctuation). The title may also affect how the node is displayed.
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.
Russell Almond
Pnode
, PnodeName()
## Not run:
library(PNetica) ## Requires PNetica
sess <- NeticaSession()
startSession(sess)
net2 <- CreateNetwork("secondNet", session=sess)
firstNode <- NewDiscreteNode(net2,"firstNode")
PnodeTitle(firstNode) <- "My First Bayesian Network Node"
stopifnot(PnodeTitle(firstNode)=="My First Bayesian Network Node")
now <- date()
PnodeDescription(firstNode)<-c("Node created on",now)
stopifnot(PnodeDescription(firstNode) ==
paste(c("Node created on",now),collapse="\n"))
## Print here escapes the newline, so is harder to read
cat(PnodeDescription(firstNode),"\n")
DeleteNetwork(net2)
stopSession(sess)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.