library(testthat)
library(stars)
library(raster)
library(PVts)
context("pvts_resample")
test_that("pvts_resample works - stars", {
data("pvts_datasets")
x <- pvts_datasets$mosaic[1]
new_x1 <- st_warp(x,cellsize = 15,crs = st_crs(x)) %>% as('Raster')
names(new_x1) <- 'st_warp'
new_x2 <- pvts_resample(x,new_x1)
names(new_x2) <- 'pvts_resample'
expect_equal(maxValue(new_x2), maxValue(new_x1))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.