tests/testthat/test-histMatch.R

context("histMatch")

library(terra)
singLay <- histMatch(lsat[[1]], lsat[[2]])
multLay <- histMatch(lsat, sqrt(lsat))

test_that("histMatch RasterLayers and Stack/Bricks", {
 	expect_is(singLay, "SpatRaster")
	expect_is(multLay, "SpatRaster")
	expect_equal(names(multLay), names(lsat))
	expect_equal(names(singLay), names(lsat)[1])
})

Try the RStoolbox package in your browser

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

RStoolbox documentation built on May 29, 2024, 6:34 a.m.