Running 'testthat.R' [125s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(RStoolbox) 
  > 
  > 
  > Sys.setenv("R_TESTS" = "") ## needed to pass R CMD check: https://github.com/hadley/testthat/issues/144
  > 
  > test_check("RStoolbox")
  -- 1. Failure: rescales to proper limits (@test-rescaleImage.R#10)  ------------
  minValue(lsat2u) not equal to rep(0.5, nlayers(lsat)).
  7/7 mismatches (average diff: 0.6)
  [1] 1.1 - 0.5 == 0.6
  [2] 1.1 - 0.5 == 0.6
  [3] 1.1 - 0.5 == 0.6
  [4] 1.1 - 0.5 == 0.6
  [5] 1.1 - 0.5 == 0.6
  [6] 1.1 - 0.5 == 0.6
  [7] 1.1 - 0.5 == 0.6
  
  -- 2. Failure: rescales to proper limits (@test-rescaleImage.R#11)  ------------
  maxValue(lsat2u) not equal to rep(1.6, nlayers(lsat)).
  7/7 mismatches (average diff: 0.6)
  [1] 2.2 - 1.6 == 0.6
  [2] 2.2 - 1.6 == 0.6
  [3] 2.2 - 1.6 == 0.6
  [4] 2.2 - 1.6 == 0.6
  [5] 2.2 - 1.6 == 0.6
  [6] 2.2 - 1.6 == 0.6
  [7] 2.2 - 1.6 == 0.6
  
  -- 3. Error: rescales to proper limits (@test-rescaleImage.R#12)  --------------
  not all objects have the same values
  1: expect_true(compareRaster(lsat2u[[1]], rescaleImage(lsat[[1]], ymin = 0.5, ymax = 1.6), 
         values = TRUE)) at testthat/test-rescaleImage.R:12
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: compareRaster(lsat2u[[1]], rescaleImage(lsat[[1]], ymin = 0.5, ymax = 1.6), values = TRUE)
  5: stop("not all objects have the same values")
  
  -- 4. Failure: deals with missing values and single valued layers and returns NA
  minValue(lsaResc[[4]]) not equal to 0.
  1/1 mismatches
  [1] 1 - 0 == 1
  
  -- 5. Failure: deals with missing values and single valued layers and returns NA
  maxValue(lsaResc[[4]]) not equal to 1.
  1/1 mismatches
  [1] 2 - 1 == 1
  
  == testthat results  ===========================================================
  OK: 720 SKIPPED: 8 FAILED: 5
  1. Failure: rescales to proper limits (@test-rescaleImage.R#10) 
  2. Failure: rescales to proper limits (@test-rescaleImage.R#11) 
  3. Error: rescales to proper limits (@test-rescaleImage.R#12) 
  4. Failure: deals with missing values and single valued layers and returns NAs (@test-rescaleImage.R#26) 
  5. Failure: deals with missing values and single valued layers and returns NAs (@test-rescaleImage.R#27) 
  
  Error: testthat unit tests failed
  Execution halted