# NOT RUN {
## Load HUGIN net file
tf <- system.file("huginex", "chest_clinic.net", package = "gRain")
chest <- loadHuginNet(tf, details=1)
chest
## Save a copy
td <- tempdir()
saveHuginNet(chest, paste(td,"/chest.net",sep=''))
## Load the copy
chest2 <- loadHuginNet(paste(td,"/chest.net",sep=''))
tf <- system.file("huginex", "golf.net", package = "gRain")
golf <- loadHuginNet(tf, details=1)
saveHuginNet(golf, paste(td,"/golf.net",sep=''))
golf2 <- loadHuginNet(paste(td,"/golf.net",sep=''))
# }
Run the code above in your browser using DataLab