loadHuginNet {gRain} | R Documentation |
These functions can load a net file saved in the 'Hugin format' into R and save a network in R as a file in the 'Hugin format'.
loadHuginNet(file, description, trace = 0) saveHuginNet(gin, file, trace = 0)
gin |
An independence network |
file |
Name of HUGIN net file. Convenient to give the file the extension '.net' |
description |
A text describing the network, defaults to file |
trace |
Debugging information |
An object (a list) of class "huginNet".
Søren Højsgaard, sorenh@agrsci.dk
tf <- system.file("huginex", "chest_clinic.net", package = "gRain") chest <- loadHuginNet(tf, trace=1) chest td <- tempdir() saveHuginNet(chest, paste(td,"/chest.net",sep='')) chest2 <- loadHuginNet(paste(td,"/chest.net",sep='')) tf <- system.file("huginex", "golf.net", package = "gRain") golf <- loadHuginNet(tf, trace=1) saveHuginNet(golf, paste(td,"/golf.net",sep='')) golf2 <- loadHuginNet(paste(td,"/golf.net",sep=''))