Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > 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")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-calcAtmosCorr.R:8:3): calcAtmosCorr for RasterLayers works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcAtmosCorr.R:8:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcAtmosCorr.R:46:3): calcAtmosCorr processes all solar bands ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcAtmosCorr.R:46:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcAtmosCorr.R:71:3): calcAtmosCorr for Satellite works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcAtmosCorr.R:71:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcDODN.R:8:3): calcDODN works as expected ─────────────────────
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcDODN.R:8:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcPathRadDOS.R:9:3): calcPathRadDOS for numeric works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcPathRadDOS.R:9:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcPathRadDOS.R:53:3): calcPathRadDOS for Satellite works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcPathRadDOS.R:53:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradModel.R:26:3): calcTOAIrradModel for 'Satellite' objects works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
       █
    1. └─base::lapply(...) test-calcTOAIrradModel.R:26:2
    2.   └─satellite:::FUN(X[[i]], ...)
    3.     ├─satellite::satellite(files) test-calcTOAIrradModel.R:29:4
    4.     └─satellite::satellite(files)
    5.       └─satellite:::.local(x, ...)
    6.         └─base::lapply(...)
    7.           └─satellite:::FUN(X[[i]], ...)
    8.             ├─raster::raster(as.character(meta$FILE)[y])
    9.             └─raster::raster(as.character(meta$FILE)[y])
   10.               └─raster:::.local(x, ...)
   11.                 └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradRadRef.R:8:3): calcTOAIrradRadRef for 'numeric' input works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcTOAIrradRadRef.R:8:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradRadRef.R:22:3): calcTOAIrradRadRef for 'numeric' input (P1L1) works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcTOAIrradRadRef.R:22:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradRadRef.R:33:3): calcTOAIrradRadRef for 'Satellite' input works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcTOAIrradRadRef.R:33:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradRadRef.R:54:3): calcTOAIrradRadRef for 'Satellite' input (P1L1) works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcTOAIrradRadRef.R:54:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-calcTOAIrradTable.R:26:3): calcTOAIrradTable for 'Satellite' input works as expected ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-calcTOAIrradTable.R:26:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-extend.R:5:1): (code run outside of `test_that()`) ──────────────
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-extend.R:5:0
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-maskInvarFeatures.R:9:3): maskInvarFeatures works as expected ───
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-maskInvarFeatures.R:9:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satInfo.R:10:3): satAddLog works as expected for Landsat 8 ──────
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satInfo.R:10:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satInvarFeatures.R:9:3): maskInvarFeatures works as expected ────
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satInvarFeatures.R:9:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:12:3): satellite works as expected for Landsat 4 and 5 files (C1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satellite.R:12:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:20:3): satellite works as expected for Landsat 7 files (C1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satellite.R:20:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:28:3): satellite works as expected for Landsat 8 files (C1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satellite.R:28:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:35:3): satellite works as expected for 'Raster*' input (C1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
       █
    1. ├─raster::stack(files[-grep("_B8.TIF$", files)]) test-satellite.R:35:2
    2. └─raster::stack(files[-grep("_B8.TIF$", files)])
    3.   └─raster:::.local(x, ...)
    4.     ├─utils::stack(rlist, bands = bands, native = native, RAT = RAT)
    5.     └─raster::stack(rlist, bands = bands, native = native, RAT = RAT)
    6.       └─raster:::.local(x, ...)
    7.         ├─raster::raster(x[[1]], native = native, RAT = RAT, ...)
    8.         └─raster::raster(x[[1]], native = native, RAT = RAT, ...)
    9.           └─raster:::.local(x, ...)
   10.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:43:3): satellite works as expected for 'list' input (C1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. └─base::lapply(files, raster) test-satellite.R:43:2
   2.   ├─raster:::FUN(X[[i]], ...)
   3.   └─raster:::FUN(X[[i]], ...)
   4.     └─raster:::.local(x, ...)
   5.       └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:60:3): satellite works as expected for Landsat 7 files (P1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satellite.R:60:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  ── Error (test-satellite.R:86:3): satellite works as expected for Landsat 8 files (P1L1) ──
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─satellite::satellite(files) test-satellite.R:86:2
   2. └─satellite::satellite(files)
   3.   └─satellite:::.local(x, ...)
   4.     └─base::lapply(...)
   5.       └─satellite:::FUN(X[[i]], ...)
   6.         ├─raster::raster(as.character(meta$FILE)[y])
   7.         └─raster::raster(as.character(meta$FILE)[y])
   8.           └─raster:::.local(x, ...)
   9.             └─raster:::.rasterObjectFromFile(...)
  
  [ FAIL 23 | WARN 0 | SKIP 3 | PASS 64 ]
  Error: Test failures
  Execution halted