powered by
Reads/saves a Bayesian network specification in the .net language used by Hugin.
.net
readnet(con=file("default.net")) savenet(nw, con=file("default.net"))
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).
readnet
network
prob
prob.network
savenet writes the object to the connection.
savenet
a connection.
an object of class network.
Susanne Gammelgaard Bottcher, Claus Dethlefsen rpackage.deal@gmail.com.
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.
data(rats) nw <- network(rats) if (FALSE) savenet(nw,file("default.net")) if (FALSE) nw2 <- readnet(file("default.net")) if (FALSE) nw2 <- prob(nw2,rats)
Run the code above in your browser using DataLab