Running ‘testthat.R’ [2s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library('testthat')
  > library('opensensmapr')
  > 
  > test_check('opensensmapr')
  Error : $ operator is invalid for atomic vectors
  ── 1. Error: osem_box_to_archive_name works for one box (@test_archive.R#23)  ──
  object of type 'closure' is not subsettable
  1: opensensmapr:::osem_box_to_archivename(box) at testthat/test_archive.R:23
  2: gsub("[^A-Za-z0-9._-]", "_", box$name)
  
  ── 2. Error: osem_box_to_archive_name works for multiple boxes (@test_archive.R#
  object 'boxes' not found
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "object 'boxes' not found", quote(eval(code, test_env))) at testthat/test_archive.R:29
  2: eval(code, test_env)
  
  ── 3. Error: osem_measurements_archive works for one box (@test_archive.R#41)  ─
  not implemented for class function
  1: osem_measurements_archive(box, as.POSIXlt("2018-08-08")) at testthat/test_archive.R:41
  2: osem_measurements_archive.default(box, as.POSIXlt("2018-08-08"))
  3: stop(paste("not implemented for class", toString(class(x))))
  
  ── 4. Error: osem_measurements_archive fails for multiple boxes (@test_archive.R
  object 'boxes' not found
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "object 'boxes' not found", quote(eval(code, test_env))) at testthat/test_archive.R:47
  2: eval(code, test_env)
  
  Error : $ operator is invalid for atomic vectors
  ── 5. Error: summary.sensebox outputs all metrics for a single box (@test_box.R#
  object of type 'closure' is not subsettable
  1: capture.output({
         summary(box)
     }) at testthat/test_box.R:42
  2: evalVis(expr)
  3: withVisible(eval(expr, pf))
  4: eval(expr, pf)
  5: eval(expr, pf)
  6: summary(box)
  7: summary.default(box)
  
  Error : $ operator is invalid for atomic vectors
  ── 6. Failure: data.frame can be converted to measurements data.frame (@test_mea
  class(df) not equal to class(m).
  Lengths differ: 4 is not 5
  
  Error : $ operator is invalid for atomic vectors
  ── 7. Error: phenomena from a not sensebox data.frame returns error (@test_pheno
  object 'boxes' not found
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "object 'boxes' not found", quote(eval(code, test_env))) at testthat/test_phenomena.R:30
  2: eval(code, test_env)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 9 SKIPPED: 35 FAILED: 7
  1. Error: osem_box_to_archive_name works for one box (@test_archive.R#23) 
  2. Error: osem_box_to_archive_name works for multiple boxes (@test_archive.R#29) 
  3. Error: osem_measurements_archive works for one box (@test_archive.R#41) 
  4. Error: osem_measurements_archive fails for multiple boxes (@test_archive.R#47) 
  5. Error: summary.sensebox outputs all metrics for a single box (@test_box.R#42) 
  6. Failure: data.frame can be converted to measurements data.frame (@test_measurements.R#128) 
  7. Error: phenomena from a not sensebox data.frame returns error (@test_phenomena.R#30) 
  
  Error: testthat unit tests failed
  Execution halted