set.seed(200)
data(rats)
fit <- network(rats)
fit.prior <- jointprior(fit)
fit <- learn(fit,rats,fit.prior)$nw
fit.new <- perturb(fit,rats,fit.prior,degree=10)$nw
data(ksl)
ksl.nw <- network(ksl)
ksl.rand <- perturb(ksl.nw,nocalc=TRUE,degree=10)$nw
plot(ksl.rand)
Run the code above in your browser using DataLab