V <- LETTERS[1:4]
edL3 <- vector("list", length=4)
for(i in 1:4)
edL3[[i]] <- list(edges=(i%%4)+1, weights=i)
names(edL3) <- V
gR3 <- graphNEL(nodes=V, edgeL=edL3, "directed")
g4 <- clearNode("A", gR3)
Run the code above in your browser using DataLab