tests/testthat/test-maskInvarFeatures.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)

  t <- maskInvarFeatures(x = getSatDataLayer(sat, "B004n"), 
                    nir = getSatDataLayer(sat, "B005n"), 
                    swir = getSatDataLayer(sat, "B007n"))
})

Try the satellite package in your browser

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

satellite documentation built on Oct. 12, 2021, 5:07 p.m.