Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rENA)
  > 
  > test_check("rENA")
  OMP: Warning #96: Cannot form a team with 3 threads, using 2 instead.
  OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
  ── 1. Error: Simple data.frame to accumulate (@test.ena.accumulate.data.file.R#2
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df, units.by = c("Name"), conversations.by = c("Day"), codes = c("c1", 
         "c2", "c3")) at testthat/test.ena.accumulate.data.file.R:20
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 2. Error: Accumulate using conversation model (@test.ena.accumulate.data.file
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df, units.by = c("Name"), conversations.by = c("Day"), codes = c("c1", 
         "c2", "c3"), window = "Conversation") at testthat/test.ena.accumulate.data.file.R:45
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 3. Error: Accumulate weighted data. (@test.ena.accumulate.data.file.R#72)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(testdf, units.by = "unit", conversations.by = "tr", codes = LETTERS[1:6], 
         window.size.back = 4, weight.by = "weighted") at testthat/test.ena.accumulate.data.file.R:72
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 4. Error: Corrected adjacency.vectors equals manually corrected raw data (cor
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(testdf, units.by = "unit", conversations.by = "tr", codes = LETTERS[1:6], 
         window.size.back = 4, weight.by = log) at testthat/test.ena.accumulate.data.file.R:90
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 5. Error: Simple forwarded metadata (@test.ena.accumulate.data.file.R#123)  ─
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df, units.by = c("Name"), conversations.by = c("Day"), codes = c("c1", 
         "c2", "c3")) at testthat/test.ena.accumulate.data.file.R:123
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 6. Error: Test trajectories (@test.ena.accumulate.data.file.R#142)  ─────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df, units.by = c("Name"), conversations.by = c("Day", "ActivityNumber"), 
         codes = c("c1", "c2", "c3"), model = "AccumulatedTrajectory") at testthat/test.ena.accumulate.data.file.R:142
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = lapply(.SD, sum)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = c(units.by, trajectory.by), .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = lapply(.SD, sum)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = c(units.by, trajectory.by), .SDcols = (codedTriNames))
  
  ── 7. Error: Simple Accumulation from separate data.frames VS from single data f
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data(units = df.units, conversation = df.conversation, codes = df.codes) at testthat/test.ena.accumulations.R:34
  2: ENAdata$new(file = df, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 8. Error: Simple forwarded metadata (@test.ena.accumulations.R#91)  ─────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data(units = df.units, conversation = df.conversation, codes = df.codes, 
         metadata = df.meta) at testthat/test.ena.accumulations.R:91
  2: ENAdata$new(file = df, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 9. Error: Test trajectories (@test.ena.accumulations.R#126)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df, units.by = c("Name"), conversations.by = c("Day", "ActivityNumber"), 
         codes = c("c1", "c2", "c3"), model = "AccumulatedTrajectory") at testthat/test.ena.accumulations.R:126
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = lapply(.SD, sum)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = c(units.by, trajectory.by), .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = lapply(.SD, sum)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = c(units.by, trajectory.by), .SDcols = (codedTriNames))
  
  ── 10. Error: COPY OF FIRST TEST FOR units/unit.names/trajectories$ TESTING PURP
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data(units = df.units, conversation = df.conversation, codes = df.codes, 
         model = "A") at testthat/test.ena.accumulations.R:203
  2: ENAdata$new(file = df, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.summed.traj.by[ENA_UNIT %in% unique(units.used), {
         cols = colnames(.SD)
         ENA_UNIT = paste(as.character(.BY), collapse = ".")
         TRAJ_UNIT = .SD[, c(trajectory.by), with = F]
         incCols = cols[!cols %in% c(trajectory.by, "ENA_ROW_IDX")]
         lag = ref_window_lag(.SD[, .SD, .SDcols = incCols], .N)
         data.table::data.table(ENA_ROW_IDX, TRAJ_UNIT, lag, ENA_UNIT = ENA_UNIT)
     }, by = c(units.by), .SDcols = c(codedTriNames, trajectory.by, "ENA_ROW_IDX")]
  7: `[.data.table`(dfDT.summed.traj.by, ENA_UNIT %in% unique(units.used), {
         cols = colnames(.SD)
         ENA_UNIT = paste(as.character(.BY), collapse = ".")
         TRAJ_UNIT = .SD[, c(trajectory.by), with = F]
         incCols = cols[!cols %in% c(trajectory.by, "ENA_ROW_IDX")]
         lag = ref_window_lag(.SD[, .SD, .SDcols = incCols], .N)
         data.table::data.table(ENA_ROW_IDX, TRAJ_UNIT, lag, ENA_UNIT = ENA_UNIT)
     }, by = c(units.by), .SDcols = c(codedTriNames, trajectory.by, "ENA_ROW_IDX"))
  
  ── 11. Error: Test accumulation with infinite windows (@test.ena.accumulations.R
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data(units = df.units, conversation = df.conversation, codes = df.codes) at testthat/test.ena.accumulations.R:245
  2: ENAdata$new(file = df, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 12. Error: Test function params (@test.ena.accumulations.R#285)  ────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data(units = df.units, conversation = df.conversation, codes = df.codes) at testthat/test.ena.accumulations.R:285
  2: ENAdata$new(file = df, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 13. Error: Simple data.frame to accumulate and make set (@test.ena.make.set.R
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df.file, units.by = c("UserName", "Condition"), conversations.by = c("ActivityNumber", 
         "GroupName"), codes = codeNames) at testthat/test.ena.make.set.R:11
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 14. Error: Test custom rotation.set (@test.ena.make.set.R#37)  ──────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df.file, units.by = c("GroupName", "Condition"), conversations.by = conversations.by, 
         codes = codeNames) at testthat/test.ena.make.set.R:37
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ── 15. Error: Test rotate by mean (@test.ena.make.set.R#58)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: ena.accumulate.data.file(df.file, units.by = c("UserName", "Condition"), conversations.by = conversations.by, 
         codes = codeNames) at testthat/test.ena.make.set.R:58
  2: ENAdata$new(file = file, units = units, units.used = units.used, units.by = units.by, 
         conversations.by = conversations.by, codes = codes, window.size.back = window.size.back, 
         window.size.forward = window.size.forward, weight.by = weight.by, model = model, 
         mask = mask, ...)
  3: .subset2(public_bind_env, "initialize")(...)
  4: private$loadFile()
  5: accumulate.data(self)
  6: dfDT.co.occurrences[ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames)]
  7: `[.data.table`(dfDT.co.occurrences, ENA_UNIT %in% units.used, {
         sums = ref_window_sum(.SD, binary)
         data.frame(ENA_ROW_IDX = .GRP, sums)
     }, by = units.by, .SDcols = (codedTriNames))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 0 SKIPPED: 3 FAILED: 15
  1. Error: Simple data.frame to accumulate (@test.ena.accumulate.data.file.R#20) 
  2. Error: Accumulate using conversation model (@test.ena.accumulate.data.file.R#45) 
  3. Error: Accumulate weighted data. (@test.ena.accumulate.data.file.R#72) 
  4. Error: Corrected adjacency.vectors equals manually corrected raw data (correction = log) (@test.ena.accumulate.data.file.R#90) 
  5. Error: Simple forwarded metadata (@test.ena.accumulate.data.file.R#123) 
  6. Error: Test trajectories (@test.ena.accumulate.data.file.R#142) 
  7. Error: Simple Accumulation from separate data.frames VS from single data frame (@test.ena.accumulations.R#34) 
  8. Error: Simple forwarded metadata (@test.ena.accumulations.R#91) 
  9. Error: Test trajectories (@test.ena.accumulations.R#126) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted