NodeTitle {RNetica}R Documentation

Gets the title or Description associated with a Netica node.

Description

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.

Usage

NodeTitle(node)
NodeTitle(node) <- value
NodeDescription(node)
NodeDescription(node) <- value

Arguments

node

A NeticaNode object.

value

A character object giving the new title or description.

Details

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.

Value

A character vector of length 1 providing the title or description.

Note

Node descriptions are called "Descriptions" in the Netica GUI, but "Comments" in the API.

Author(s)

Russell Almond

References

http://norsys.com/onLineAPIManual/index.html: GetNodeTitle_bn(), SetNodeTitle_bn(), GetNodeComments_bn(), SetNodeComments_bn()

See Also

NeticaNode, NodeName()

Examples

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)

[Package RNetica version 0.8-4 Index]