# generate initial and ideal network
cohesiveBM <- rbind(c("com", "nul"), c("nul", "com"))
ideal <- genNetworkLE(BM = cohesiveBM, LE = 0, size = c(4, 4))
random <- genNetworkLE(BM = cohesiveBM, LE = 1, size = c(4, 4))
# generate network with the RL algorithm
generatedNetwork <- RL(ideal.net = ideal, initial.net = random, triads = "all", k = 10)
Run the code above in your browser using DataLab