PnodeName {Peanut}R Documentation

Gets or sets name of a parameterized node.

Description

Gets or sets the name of the node. Rules for names are implementation dependent, but they should generally conform to variable naming conventions (begin with a letter and only contain alphanumeric characters, no embeded spaces.)

Usage

PnodeName(node)
PnodeName(node)<- value

Arguments

node

A Pnode object that references the node.

value

An character vector of length 1 giving the new name.

Details

The PnodeTitle() function provides another way to name a node which is not subject to naming restrictions.

Value

The name of the node as a character vector of length 1.

The setter method returns the node argument.

Author(s)

Russell Almond

See Also

Pnode, PnetFindNode(), PnodeTitle(),

Examples

## Not run: 
library(PNetica) # Requires PNetica
sess <- NeticaSession()
startSession(sess)
net <- CreateNetwork("funNet", session=sess)

pnode <- NewDiscreteNode(net,"play")

stopifnot(PnodeName(pnode)=="play")
stopifnot(PnetFindNode(net,"play")==pnode)

NodeName(pnode)<-"work"
stopifnot(PnetFindNode(net,"work")==pnode)

DeleteNetwork(net)
stopSession(sess)

## End(Not run)

[Package Peanut version 0.7-1 Index]