A <- factor(NA,levels=paste("A",1:2,sep=""))
B <- factor(NA,levels=paste("B",1:3,sep=""))
c1 <- NA
c2 <- NA
df <- data.frame(A,B,c1,c2)
nw <- network(df,doprob=FALSE) # doprob must be FALSE
nw <- makesimprob(nw) # create simprob properties
set.seed(944)
sim <- rnetwork(nw,n=100) # create simulated data frame
Run the code above in your browser using DataLab