tests/testthat/test-RastStackData.R

test_that("RastStackData produces a raster stack with appropriate dimensions", {
  xyzdf <- expand.grid(x = c(1:3), y = c(1:3))
  xyzdf$z1 <- runif(9)
  xyzdf$z2 <- runif(9)
  xyzdf$z3 <- runif(9)

  zstack <- RastStackData(xyzdf)
  zstack <- terra::rast(zstack)
  expect_equal(dim(zstack), c(3, 3, 3))
})

Try the ICvectorfields package in your browser

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

ICvectorfields documentation built on March 18, 2022, 7:34 p.m.