PnetName: Gets or Sets the name of a Netica network.

PnetNameR Documentation

Gets or Sets the name of a Netica network.

Description

Gets or sets the name of the network. Names must conform to the IDname rules

Usage

PnetName(net)
PnetName(net) <- value

Arguments

net

A NeticaBN object which links to the network.

value

A character scalar containing the new name.

Details

Network names must conform to the IDname rules for Netica identifiers. Trying to set the network to a name that does not conform to the rules will produce an error, as will trying to set the network name to a name that corresponds to another different network.

The PnetTitle() function provides another way to name a network which is not subject to the IDname restrictions.

Value

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

The setter method returns the modified object.

Note

NeticaBN objects are internally implemented as character vectors giving the name of the network. If a network is renamed, then it is possible that R will hold onto an old reference that still using the old name. In this case, PnetName(net) will give the correct name, and GetNamedNets(PnetName(net)) will return a reference to a corrected object.

Author(s)

Russell Almond

References

http://norsys.com/onLineAPIManual/index.html: GetNetName_bn(), SetNetName_bn()

See Also

CreateNetwork(), NeticaBN, GetNamedNetworks(), PnetTitle()

Examples

sess <- NeticaSession()
startSession(sess)

net <- CreateNetwork("funNet",sess)
netcached <- net

stopifnot(PnetName(net)=="funNet")

PnetName(net)<-"SomethingElse"
stopifnot(PnetName(net)=="SomethingElse")

stopifnot(PnetName(net)==PnetName(netcached))

DeleteNetwork(net)

ralmond/PNetica documentation built on Sept. 19, 2023, 8:27 a.m.