PnetTitle: Gets the title or comments associated with a parameterized...

PnetTitleR Documentation

Gets the title or comments associated with a parameterized network.

Description

The title is a longer name for a network which is not subject to naming restrictions. The description is free form text used to document the network. Both fields are optional.

Usage

PnetTitle(net)
PnetTitle(net) <- value
PnetDescription(net)
PnetDescription(net) <- value

Arguments

net

A Pnet 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 network naming restrictions.

The text is any text the user chooses to attach to the network. 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.

Setter methods return the object.

Author(s)

Russell Almond

See Also

Pnet, PnetName()

Examples

## Not run: 
library(PNetica) ## Requires PNetica
sess <- NeticaSession()
startSession(sess)

firstNet <- CreateNetwork("firstNet",sess)

PnetTitle(firstNet) <- "My First Bayesian Network"
stopifnot(PnetTitle(firstNet)=="My First Bayesian Network")

now <- date()
PnetDescription(firstNet)<-c("Network created on",now)
## Print here escapes the newline, so is harder to read
cat(PnetDescription(firstNet),"\n")
stopifnot(PnetDescription(firstNet) ==
  paste(c("Network created on",now),collapse="\n"))


DeleteNetwork(firstNet)

stopSession(sess)

## End(Not run)

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