Learn R Programming

deal (version 1.2-8)

readnet: Reads/saves .net file

Description

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

Usage

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

Arguments

con
a connection.
nw
an object of class network.

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.

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.

References

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

See Also

network

Examples

Run this code
data(rats)
nw <- network(rats)
savenet(nw,file("default.net"))
nw2 <- readnet(file("default.net"))
nw2 <- prob(nw2,rats)

Run the code above in your browser using DataLab