R Under development (unstable) (2024-02-09 r85879 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(satellite) Loading required package: raster Loading required package: sp > > > ### functions to create test data sets ----- > > ### Utility functions to quickly create test data sets for various sensors > ### Florian Detsch, last modified on 2017-07-24 > > tst_obj <- function(type = c("LC08", "LC8", "LE07", "LE7", "LT05")) { + if (type[1] == "LC08") + tst_obj_lc08() + else if (type[1] == "LC8") + tst_obj_lc8() + else if (type[1] == "LE07") + tst_obj_le07() + else if (type[1] == "LE7") + tst_obj_le7() + else if (type[1] == "LT05") + tst_obj_lt05() + else + stop("Sensor test data not available, yet.\n") + } > > > ### collection 1 level-1 ----- > > ## landsat 8 > tst_obj_lc08 <- function() { + path <- system.file("extdata", package = "satellite") + files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE) + satellite(files) + } > > ## landsat 7 > tst_obj_le07 <- function() { + path <- system.file("extdata", package = "satellite") + files <- list.files(path, pattern = glob2rx("LE07*.TIF"), full.names = TRUE) + satellite(files) + } > > ## landsat 5 > tst_obj_lt05 <- function() { + path <- system.file("testdata/LT05", package = "satellite") + files <- list.files(path, pattern = glob2rx("LT05*.TIF"), full.names = TRUE) + satellite(files) + } > > > ### precollection level-1 ----- > > ## landsat 8 > tst_obj_lc8 <- function() { + path <- system.file("testdata/LC8", package = "satellite") + files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE) + satellite(files) + } > > ## landsat 7 > tst_obj_le7 <- function() { + path <- system.file("testdata/LE7", package = "satellite") + files <- list.files(path, pattern = glob2rx("LE7*.TIF"), full.names = TRUE) + satellite(files) + } > > > ### perform tests ----- > > test_check("satellite") [ FAIL 0 | WARN 0 | SKIP 12 | PASS 145 ] ══ Skipped tests (12) ══════════════════════════════════════════════════════════ • empty test (12): 'test-calcPathRadDOS.R:6:1', 'test-calcPathRadDOS.R:49:1', 'test-calcTOAIrradModel.R:5:1', 'test-calcTOAIrradRadRef.R:19:1', 'test-maskInvarFeatures.R:3:1', 'test-satellite.R:8:1', 'test-satellite.R:16:1', 'test-satellite.R:24:1', 'test-satellite.R:32:1', 'test-satellite.R:39:1', 'test-satellite.R:106:1', 'test-satellite.R:110:1' [ FAIL 0 | WARN 0 | SKIP 12 | PASS 145 ] > > proc.time() user system elapsed 34.78 1.21 36.01