data(rats)
rats.nw <- network(rats)
rats.pr <- jointprior(rats.nw,12)
rats.nw <- getnetwork(learn(rats.nw,rats,rats.pr))
rats.tr <- maketrylist(rats.nw,rats,rats.pr)
rats.hi <- getnetwork(heuristic(rats.nw,rats,rats.pr,trylist=rats.tr))
Run the code above in your browser using DataLab