library(igraph)
library(netplot)
set.seed(1)
x <- sample_smallworld(1, 200, 5, 0.03)
# Plotting
nplot(x)
# Clicking (only works in interactive mode)
if (interactive()) {
res <- locate_vertex()
print(res)
}
Run the code above in your browser using DataLab