Running ‘unittests.R’ [5s/5s]
Running the tests in ‘tests/unittests.R’ failed.
Complete output:
  > library ("hyperSpec")
  Loading required package: lattice
  Loading required package: grid
  Loading required package: ggplot2
  Package hyperSpec, version 0.99-20171005
  
  To get started, try
     vignette ("hyperspec")
     package?hyperSpec 
     vignette (package = "hyperSpec")
  
  If you use this package please cite it appropriately.
     citation("hyperSpec")
  will give you the correct reference.
  
  The project homepage is http://hyperspec.r-forge.r-project.org
  
  
  > hy.unittest ()
  .cut.ticks: .
  guess.wavelength: 1.2
  collapse: ...........
  hy.getOptions: ...
  read.spe: S
  .initialize / new ("hyperSpec"): ........................
  .rbind2: ........
  pearson.dist: .
  bind: .....
  rbind.hyperSpec: ...
  .fileio.optional: ....S
  spc.fit.poly.below: ....
  spc.NA.approx: ............
  .DollarNames: ...
  normalize01: ...........
  stacked.offsets: .....
  spc.fit.poly: ..
  .merge: ..
  hy.setOptions: ..............................
  .levelplot: ....
  as.hyperSpec: 3.....4
  decomposition: .........
  wl.eval: .........
  apply: ....
  vanderMonde: ......
  plotmat: .
  .all.equal: .........
  .labels: ....
  
  Skipped ------------------------------------------------------------------------
  1. filename column returned with xaxis = 'px' (issue #60) - file import test files not installed
  
  2. option treatment - TODO: implement
  
  Failed -------------------------------------------------------------------------
  1. Error: simple test ----------------------------------------------------------
  a character vector argument expected
  1: expect_equal(guess.wavelength(1:5), 1:5)
  2: compare(object, expected, ...)
  3: guess.wavelength(1:5)
  4: regmatches(X, regexpr(.PATTERN.number, X))
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  2. Error: return NULL if could not guess wavelenths ----------------------------
  a character vector argument expected
  1: expect_equal(guess.wavelength(colnames(matrix(1:12, 3))), NULL)
  2: compare(object, expected, ...)
  3: guess.wavelength(colnames(matrix(1:12, 3)))
  4: regmatches(X, regexpr(.PATTERN.number, X))
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  3. Error: only spc is given ----------------------------------------------------
  a character vector argument expected
  1: expect_identical(new("hyperSpec", spc = spc), as.hyperSpec(X = spc))
  2: identical(object, expected)
  3: as.hyperSpec(X = spc)
  4: as.hyperSpec(X = spc)
  5: .local(X, ...)
  6: new("hyperSpec", spc = X, wavelength = wl, ...)
  7: initialize(value, ...)
  8: initialize(value, ...)
  9: .local(.Object, ...)
  10: guess.wavelength(colnames(X))
  11: regmatches(X, regexpr(.PATTERN.number, X))
  12: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  4. Error: set additional parameters --------------------------------------------
  a character vector argument expected
  1: expect_identical(new("hyperSpec", spc = spc, data = dt, label = lbs), as.hyperSpec(X = spc, 
         data = dt, label = lbs))
  2: identical(object, expected)
  3: as.hyperSpec(X = spc, data = dt, label = lbs)
  4: as.hyperSpec(X = spc, data = dt, label = lbs)
  5: .local(X, ...)
  6: new("hyperSpec", spc = X, wavelength = wl, ...)
  7: initialize(value, ...)
  8: initialize(value, ...)
  9: .local(.Object, ...)
  10: guess.wavelength(colnames(X))
  11: regmatches(X, regexpr(.PATTERN.number, X))
  12: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  DONE ===========================================================================
  > 
  > library (testthat)
  > test_check("hyperSpec")
  1. Error: simple test ----------------------------------------------------------
  a character vector argument expected
  1: expect_equal(guess.wavelength(1:5), 1:5)
  2: compare(object, expected, ...)
  3: guess.wavelength(1:5)
  4: regmatches(X, regexpr(.PATTERN.number, X))
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  2. Error: return NULL if could not guess wavelenths ----------------------------
  a character vector argument expected
  1: expect_equal(guess.wavelength(colnames(matrix(1:12, 3))), NULL)
  2: compare(object, expected, ...)
  3: guess.wavelength(colnames(matrix(1:12, 3)))
  4: regmatches(X, regexpr(.PATTERN.number, X))
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  3. Error: only spc is given ----------------------------------------------------
  a character vector argument expected
  1: expect_identical(new("hyperSpec", spc = spc), as.hyperSpec(X = spc))
  2: identical(object, expected)
  3: as.hyperSpec(X = spc)
  4: as.hyperSpec(X = spc)
  5: .local(X, ...)
  6: new("hyperSpec", spc = X, wavelength = wl, ...)
  7: initialize(value, ...)
  8: initialize(value, ...)
  9: .local(.Object, ...)
  10: guess.wavelength(colnames(X))
  11: regmatches(X, regexpr(.PATTERN.number, X))
  12: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  4. Error: set additional parameters --------------------------------------------
  a character vector argument expected
  1: expect_identical(new("hyperSpec", spc = spc, data = dt, label = lbs), as.hyperSpec(X = spc, 
         data = dt, label = lbs))
  2: identical(object, expected)
  3: as.hyperSpec(X = spc, data = dt, label = lbs)
  4: as.hyperSpec(X = spc, data = dt, label = lbs)
  5: .local(X, ...)
  6: new("hyperSpec", spc = X, wavelength = wl, ...)
  7: initialize(value, ...)
  8: initialize(value, ...)
  9: .local(.Object, ...)
  10: guess.wavelength(colnames(X))
  11: regmatches(X, regexpr(.PATTERN.number, X))
  12: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  testthat results ================================================================
  OK: 181 SKIPPED: 2 FAILED: 4
  1. Error: simple test 
  2. Error: return NULL if could not guess wavelenths 
  3. Error: only spc is given 
  4. Error: set additional parameters 
  
  Error: testthat unit tests failed
  Execution halted