Running ‘testthat.R’ [3s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tstools)
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  > 
  > test_check("tstools")
  ── 1. Error: CSV long export works (@testWriteTimeseries.R#76)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "csv", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:76
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
  ── 2. Error: XLSX long export works (@testWriteTimeseries.R#140)  ──────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
    adding: tmp/RtmpJCwMt5/test_ts_2018_05_04.json (deflated 82%)
  ── 3. Error: imports work (@testWriteTimeseries.R#252)  ────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(ts, read_ts(csv_wide_name)) at testthat/testWriteTimeseries.R:252
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(csv_wide_name)
  5: read_ts.csv(file)
  6: wide_to_ts(csv)
  7: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  8: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  9: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ── 4. Error: differing lengths work (@testWriteTimeseries.R#302)  ──────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: read_ts("faulty.csv") at testthat/testWriteTimeseries.R:302
  2: read_ts.csv(file)
  3: wide_to_ts(csv)
  4: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  5: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  6: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ── 5. Error: CSV long export works (@testWriteTimeseries.R#76)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "csv", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:76
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
  ── 6. Error: XLSX long export works (@testWriteTimeseries.R#140)  ──────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
    adding: tmp/RtmpJCwMt5/test_ts_2018_05_04.json (deflated 82%)
  ── 7. Error: imports work (@testWriteTimeseries.R#252)  ────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(ts, read_ts(csv_wide_name)) at testthat/testWriteTimeseries.R:252
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(csv_wide_name)
  5: read_ts.csv(file)
  6: wide_to_ts(csv)
  7: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  8: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  9: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ── 8. Error: differing lengths work (@testWriteTimeseries.R#302)  ──────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: read_ts("faulty.csv") at testthat/testWriteTimeseries.R:302
  2: read_ts.csv(file)
  3: wide_to_ts(csv)
  4: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  5: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  6: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ── 9. Error: CSV long export works (@testWriteTimeseries.R#76)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "csv", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:76
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
  ── 10. Error: XLSX long export works (@testWriteTimeseries.R#140)  ─────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: tsdf[, `:=`(freq = frequency(tl[[index]]), series = tl_names[index], value = as.numeric(tl[[index]][internal_index]), 
         date_numeric = as.numeric(time(tl[[index]]))), by = index]
  3: `[.data.table`(tsdf, , `:=`(freq = frequency(tl[[index]]), series = tl_names[index], 
         value = as.numeric(tl[[index]][internal_index]), date_numeric = as.numeric(time(tl[[index]]))), 
         by = index)
  
    adding: tmp/RtmpJCwMt5/test_ts_2018_05_04.json (deflated 82%)
  ── 11. Error: imports work (@testWriteTimeseries.R#252)  ───────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(ts, read_ts(csv_wide_name)) at testthat/testWriteTimeseries.R:252
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(csv_wide_name)
  5: read_ts.csv(file)
  6: wide_to_ts(csv)
  7: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  8: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  9: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ── 12. Error: differing lengths work (@testWriteTimeseries.R#302)  ─────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: read_ts("faulty.csv") at testthat/testWriteTimeseries.R:302
  2: read_ts.csv(file)
  3: wide_to_ts(csv)
  4: long_to_ts(melt(data, id.vars = "date", variable.name = "series"))
  5: data_dt[, `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), by = series]
  6: `[.data.table`(data_dt, , `:=`(date_zoo = as.numeric(as.yearmon(date)), frq = 12), 
         by = series)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 78 SKIPPED: 0 FAILED: 12
  1. Error: CSV long export works (@testWriteTimeseries.R#76) 
  2. Error: XLSX long export works (@testWriteTimeseries.R#140) 
  3. Error: imports work (@testWriteTimeseries.R#252) 
  4. Error: differing lengths work (@testWriteTimeseries.R#302) 
  5. Error: CSV long export works (@testWriteTimeseries.R#76) 
  6. Error: XLSX long export works (@testWriteTimeseries.R#140) 
  7. Error: imports work (@testWriteTimeseries.R#252) 
  8. Error: differing lengths work (@testWriteTimeseries.R#302) 
  9. Error: CSV long export works (@testWriteTimeseries.R#76) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted