tests/testthat/setup.R

# --- Setup a real r5r network for testing new features ---
# This is needed to test automatic bounding box calculation.
# It will be skipped if r5r is not installed anyway.

skip_on_cran()
if (requireNamespace("r5r", quietly = TRUE)) {
  data_path <- system.file("extdata/poa", package = "r5r")
  if (utils::packageVersion("r5r") >= "2.3.0") {
    r5r_net <- r5r::build_network(data_path)
  } else {
    r5r_net <- r5r::setup_r5(data_path)
  }
}

Try the r5rgui package in your browser

Any scripts or data that you put into this service are public.

r5rgui documentation built on Nov. 25, 2025, 9:07 a.m.