readnet                 package:deal                 R Documentation

_R_e_a_d_s/_s_a_v_e_s ._n_e_t _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

     con: a connection.

      nw: an object of class 'network'.

_D_e_t_a_i_l_s:

     '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.

_V_a_l_u_e:

     '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.

_N_o_t_e:

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

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     'network'

_E_x_a_m_p_l_e_s:

     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)

