Nothing
context("pifMatch")
library(terra)
lsat_b <- log(lsat)
for(m in c("cor", "sam", "ed")) {
test_that("pifMatch return classes", {
expect_is(lb <- pifMatch(lsat_b, lsat, method = m, returnPifMap = TRUE, returnSimMap = TRUE, returnModels = TRUE), "list", info = sprintf("method=%s", m))
expect_equal(names(lb), c("img", "simMap", "pifMap", "models"))
expect_is(lb$models$B1_dn, "lm")
expect_true(all(vapply(lb[2:3],inherits, logical(1), "SpatRaster")))
expect_is(lb$img, "list")
})
}
test_that("error messages", {
expect_error(lb <- pifMatch(lsat_b, lsat, method = "ok", returnPifMap = TRUE, returnSimMap = TRUE, returnModels = TRUE), "method must be one of")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.