readnet | R Documentation |
Reads/saves a Bayesian network specification in the .net
language used by Hugin.
readnet(con=file("default.net")) savenet(nw, con=file("default.net"))
con |
a connection. |
nw |
an object of class |
readnet
reads only the structure of a network, i.e.\ the
directed acyclic graph.
savenet
exports the prob
property for each node in the
network object along with the network structure defined by the parents
of each node.
readnet
creates an object of class network
with
the nodes specified as
in the .net
connection. The network
has not been learned and the nodes do not have prob
properties
(see prob.network
).
savenet
writes the object to the connection.
The call to readnet(savenet(network))
is not the identity
function as information is thrown away in both savenet
and
readnet
.
Susanne Gammelgaard Bottcher,
Claus Dethlefsen rpackage.deal@gmail.com.
network
data(rats) nw <- network(rats) ## Not run: savenet(nw,file("default.net")) ## Not run: nw2 <- readnet(file("default.net")) ## Not run: nw2 <- prob(nw2,rats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.