readnet: Reads/saves .net file

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Reads/saves a Bayesian network specification in the .net language (see http://developer.hugin.com/documentation/net/).

Usage

1
2
readnet(con=file("default.net"))
savenet(nw, con=file("default.net"))

Arguments

con

a connection.

nw

an object of class network.

Details

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.

Value

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.

Note

The call to readnet(savenet(network)) is not the identity function as information is thrown away in both savenet and readnet.

Author(s)

Susanne Gammelgaard Bottcher alma@math.aau.dk,
Claus Dethlefsen cld@rn.dk.

References

Further information about deal can be found at:
http://www.math.aau.dk/~dethlef/novo/deal.

See Also

network

Examples

1
2
3
4
5
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)


Search within the deal package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.