test_that ("make_compact_graph", {
dat <- sf::st_read ("../osm-ways-munich.osm", layer="lines",
quiet=TRUE)
nw <- osmlines_as_network (dat)
comp <- make_compact_graph (nw)
isDf <- is (comp, "list")
testthat::expect_true (isDf)
testthat::expect_error (
make_compact_graph ("not a data.frame"),
"graph must be of type data.frame")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.