tests/testthat/test-satInvarFeatures.R

context("maskInvarFeatures")

test_that("maskInvarFeatures works as expected", {
  path <- system.file("testdata/LC8", 
                      package = "satellite")
  files <- list.files(path, 
                      pattern = glob2rx("LC8*.TIF"), 
                      full.names = TRUE)
  sat <- satellite(files)
  t1 <- maskInvarFeatures(sat)
  
  expect_equal(
    raster::getValues(getSatDataLayer(t1, bcde = "M0000_InvarFeatures"))[77],
    TRUE)
  })

Try the satellite package in your browser

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

satellite documentation built on May 29, 2024, 6:16 a.m.