Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(scopr)
  Loading required package: behavr
  Loading required package: data.table
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > 
  > test_check("scopr")
  Saving _problems/test-build_query-12.R
  Saving _problems/test-build_query-40.R
  Saving _problems/test-build_query-53.R
  Saving _problems/test-build_query-68.R
  Saving _problems/test-build_query-83.R
    machine_name       date     time test
  1        E_014 2016-01-25 21:36:04    1
  2        E_014 2016-02-17     <NA>    2
  3        E_029 2016-01-25     <NA>    3
  Saving _problems/test-build_query-110.R
  Saving _problems/test-link_ethocope_metadata-6.R
  Saving _problems/test-link_ethocope_metadata-24.R
  Saving _problems/test-link_ethocope_metadata-39.R
  Saving _problems/test-link_ethocope_metadata-60.R
  Saving _problems/test-link_ethocope_metadata-73.R
  Saving _problems/test-link_ethocope_metadata-94.R
  Saving _problems/test-link_ethoscope_metadata_remote-18.R
  Saving _problems/test-link_ethoscope_metadata_remote-55.R
  Saving _problems/test-load_ethoscope-11.R
  Saving _problems/test-load_ethoscope-23.R
  Saving _problems/test-load_ethoscope-36.R
  [ FAIL 17 | WARN 0 | SKIP 0 | PASS 17 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-build_query.R:12:3'): build query works when time is supplied ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr:::build_query(dir, query) at test-build_query.R:12:3
   2.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-build_query.R:40:3'): build_query with date, machine name, and ROIs, and two experiments on the same date, but different times! ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr:::build_query(dir, query) at test-build_query.R:40:3
   2.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-build_query.R:53:3'): build query works when only date supplied ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-build_query.R:53:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─scopr:::build_query(dir, query)
   7.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-build_query.R:68:3'): build query works when only date supplied and ROIs ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-build_query.R:68:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─scopr:::build_query(dir, query)
   7.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-build_query.R:83:3'): missing results! ─────────────────────────
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-build_query.R:83:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─scopr:::build_query(dir, query)
   7.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-build_query.R:110:3'): build query works datetime is a datetime, not a string (https://github.com/rethomics/scopr/issues/16) ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr:::build_query(dir, query) at test-build_query.R:110:3
   2.   ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethocope_metadata.R:6:3'): link_ethoscope_metadata with single file ──
  Error in ``[.data.table`(out, , `:=`(n, .N), keyby = key(out))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(test_file) at test-link_ethocope_metadata.R:6:3
   2.   ├─out[, `:=`(n, .N), keyby = key(out)]
   3.   └─data.table:::`[.data.table`(out, , `:=`(n, .N), keyby = key(out))
  ── Error ('test-link_ethocope_metadata.R:24:3'): link_ethoscope_metadata with date and machine name ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(query, dir) at test-link_ethocope_metadata.R:24:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethocope_metadata.R:39:3'): link_ethoscope_metadata with name of a text csv ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(file, dir) at test-link_ethocope_metadata.R:39:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethocope_metadata.R:60:3'): link_ethoscope_metadata with date, machine name, and ROIs ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(query, dir) at test-link_ethocope_metadata.R:60:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethocope_metadata.R:73:3'): link_ethoscope_metadata with path ──
  Error in ``[.data.table`(out, , `:=`(n, .N), keyby = key(out))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(query, dir) at test-link_ethocope_metadata.R:73:3
   2.   ├─out[, `:=`(n, .N), keyby = key(out)]
   3.   └─data.table:::`[.data.table`(out, , `:=`(n, .N), keyby = key(out))
  ── Error ('test-link_ethocope_metadata.R:94:3'): link_ethoscope_metadata detect duplicated rows ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-link_ethocope_metadata.R:94:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─scopr:::link_ethoscope_metadata(query, dir)
   7.   └─scopr:::build_query(result_dir, query, index_file)
   8.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   9.     └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethoscope_metadata_remote.R:14:3'): link_ethoscope_metadata_remote with date and machine name ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr:::link_ethoscope_metadata_remote(...) at test-link_ethoscope_metadata_remote.R:14:3
   2.   └─scopr:::build_query(result_dir = remote_dir, query = query, index_file = index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-link_ethoscope_metadata_remote.R:51:3'): parse_query with date, machine name, and ROIs ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr:::link_ethoscope_metadata_remote(...) at test-link_ethoscope_metadata_remote.R:51:3
   2.   └─scopr:::build_query(result_dir = remote_dir, query = query, index_file = index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-load_ethoscope.R:11:3'): query ethoscopes functions ────────────
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(metadata, dir) at test-load_ethoscope.R:11:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-load_ethoscope.R:23:3'): query ethoscopes works ────────────────
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(metadata, dir) at test-load_ethoscope.R:23:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-load_ethoscope.R:36:3'): query ethoscopes works with multiple cores ──
  Error in ``[.data.table`(unique_fi_last_of_day, , `:=`(n, .N), by = c("date", "machine_name"))`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─scopr::link_ethoscope_metadata(query, dir) at test-load_ethoscope.R:36:3
   2.   └─scopr:::build_query(result_dir, query, index_file)
   3.     ├─unique_fi_last_of_day[, `:=`(n, .N), by = c("date", "machine_name")]
   4.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 17 | WARN 0 | SKIP 0 | PASS 17 ]
  Error:
  ! Test failures.
  Execution halted