modelstring(x) modelstring(x, debug = FALSE) <- value
model2network(string, ordering = NULL, debug = FALSE)
# S3 method for bn as.character(x, ...) # S3 method for character as.bn(x)
modelstring(but not its replacement form) accepts also objects of class
NULLthe nodes are sorted alphabetically.
TRUEa lot of debugging output is printed; otherwise the function is completely silent.
as.bnreturn an object of class
as.character.bnreturn a character string.
modelstringhave the same format as the ones returned by the
modelstringfunction in package deal; network structures may be easily exported to and imported from that package (via the
model2networkfunction). The format of the model strings is as follows. The local structure of each node is enclosed in square brackets ("
"); the first string is the label of that node. The parents of the node (if any) are listed after a ("
|") and separated by colons ("
:"). All nodes (including isolated and root nodes) must be listed.
data(learning.test) res = set.arc(gs(learning.test), "A", "B") res modelstring(res) res2 = model2network(modelstring(res)) res2 all.equal(res, res2)