PnetTitle | R Documentation |
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.
PnetTitle(net)
PnetTitle(net) <- value
PnetDescription(net)
PnetDescription(net) <- value
net |
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 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.
A character vector of length 1 providing the title or description.
Setter methods return the object.
Russell Almond
Pnet
, PnetName()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.