tests/testthat/setup.R

# Generate necessary graph data

library(tidygraph)
library(igraph)
library(purrr)
set.seed(10)

n_count <- 30
s_count <- 5

g <- play_geometry(n = n_count, radius = 0.2)

e_count <- ecount(g)

which_e <- sample.int(e_count, size = 5, replace = FALSE)
e <- seq_len(e_count) %in% which_e

island_g <- g %>%
  bind_nodes(data.frame(x = 0, y = 0))

numbered_graph <- add_oids(g)

rppr_graph <- decorate_graph(g, which_e)
dSHARP-CMU/rppr documentation built on May 14, 2019, 4:01 a.m.