tests/testthat/test-errors-messages.R

CLUSexample <- prepExData(CLUSexample)
test_that("different CRS is error", {
  cost <- CLUSexample$cost
  terra::crs(cost) <-  "+proj=longlat"
  rds <- CLUSexample$roads
  terra::crs(rds) <-  "EPSG:5070"
  expect_error(projectRoads(CLUSexample$landings, cost, rds), "must match")
  

})

Try the roads package in your browser

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

roads documentation built on Jan. 16, 2026, 5:18 p.m.