tests/testthat/test-df2rast.R

test_that("check if the object class is correct", {

  # load data
  dat <- phyloraster::load.data.rosauer()

  # tests
  expect_s4_class(phyloraster::df2rast(dat$presab),
                  "SpatRaster")
  expect_s4_class(phyloraster::df2rast(dat$presab, CRS = "EPSG:2169"),
                  "SpatRaster")
})

Try the phyloraster package in your browser

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

phyloraster documentation built on April 3, 2025, 8:45 p.m.