tests/testthat/test-get.R

test_that("functions to get elevations from sf objects work", {
  if(nchar(Sys.getenv("MAPBOX_API_KEY")) < 8)
    skip(message = "Skipping test, MAPBOX token in .Renviron needed")
  r = cyclestreets_route
  e = elevation_get(r)
  expect_equal(class(e)[1], "RasterLayer")
})

Try the slopes package in your browser

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

slopes documentation built on June 23, 2025, 5:08 p.m.