nl.path <- "C:/Program Files/NetLogo 6.0/app"
NLStart(nl.path)
model.path <-
"/models/Sample Models/Networks/Preferential Attachment.nlogo"
NLLoadModel(paste(nl.path,model.path,sep=""))
NLCommand("setup")
NLDoCommand(4, "go")
graph1 <- NLGetGraph()
plot(graph1, layout=layout.kamada.kawai, vertex.label=V(graph1)$name,
vertex.shape="rectangle", vertex.size=20, asp=FALSE)
Run the code above in your browser using DataLab