# NOT RUN {
# Create an undirected GNP
# graph with 100 nodes using
# a probability value of 0.05
gnp_graph <-
create_graph(
directed = FALSE) %>%
add_gnp_graph(
n = 100,
p = 0.05)
# Get a count of nodes
gnp_graph %>% node_count()
#> [1] 100
# Get a count of edges
gnp_graph %>% edge_count()
#> [1] 216
# }
Run the code above in your browser using DataLab