context("makeSims")
test_that("makeSims outputs list of two objects", {
set.seed(100);
popRaster <- raster(matrix(1:10, ncol=10,nrow=10))
rRaster <- raster::stack(
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)),
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)),
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)),
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)),
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)),
raster(matrix(seq(0.5,1.5, length.out=10), ncol=10, nrow=10)))
samplingRaster <- raster(matrix(1, ncol=10,nrow=10))
test <- makeSims(popRaster, rRaster, samplingRaster, 100)
expect_equal(length(test),2)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.