Running ‘testthat.R’ [1s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mdftracks)
  > 
  > test_check("mdftracks")
  ── ERROR (testWriteMdf.R:34:3): Data frames with columns id, t, x, y, z (MotilyL
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_output(...) testWriteMdf.R:34:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─mdftracks::write.mdf(test.df[, c("uid", "t", "x", "y", "z")])
   11.   ├─track.data[order(track.data[cn["t"]]), ]
   12.   ├─base::`[.data.frame`(...)
   13.   └─base::order(track.data[cn["t"]])
   14.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   15.       └─base:::FUN(X[[i]], ...)
   16.         ├─base::as.vector(xtfrm(x))
   17.         ├─base::xtfrm(x)
   18.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:41:3): Factor columns are converted to numeric ────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_message(...) testWriteMdf.R:41:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─utils::capture.output(write.mdf(temp.df))
    7. │ └─base::withVisible(...elt(i))
    8. └─mdftracks::write.mdf(temp.df)
    9.   ├─track.data[order(track.data[cn["t"]]), ]
   10.   ├─base::`[.data.frame`(...)
   11.   └─base::order(track.data[cn["t"]])
   12.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   13.       └─base:::FUN(X[[i]], ...)
   14.         ├─base::as.vector(xtfrm(x))
   15.         ├─base::xtfrm(x)
   16.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:49:3): Output to file works ───────────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
      █
   1. └─mdftracks::write.mdf(...) testWriteMdf.R:49:2
   2.   ├─track.data[order(track.data[cn["t"]]), ]
   3.   ├─base::`[.data.frame`(...)
   4.   └─base::order(track.data[cn["t"]])
   5.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       └─base:::FUN(X[[i]], ...)
   7.         ├─base::as.vector(xtfrm(x))
   8.         ├─base::xtfrm(x)
   9.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:62:3): Output to file connection works when connection 
  Error: cannot xtfrm 'x'
  Backtrace:
      █
   1. └─mdftracks::write.mdf(...) testWriteMdf.R:62:2
   2.   ├─track.data[order(track.data[cn["t"]]), ]
   3.   ├─base::`[.data.frame`(...)
   4.   └─base::order(track.data[cn["t"]])
   5.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       └─base:::FUN(X[[i]], ...)
   7.         ├─base::as.vector(xtfrm(x))
   8.         ├─base::xtfrm(x)
   9.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:73:3): Output to connection works ─────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
      █
   1. └─mdftracks::write.mdf(...) testWriteMdf.R:73:2
   2.   ├─track.data[order(track.data[cn["t"]]), ]
   3.   ├─base::`[.data.frame`(...)
   4.   └─base::order(track.data[cn["t"]])
   5.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       └─base:::FUN(X[[i]], ...)
   7.         ├─base::as.vector(xtfrm(x))
   8.         ├─base::xtfrm(x)
   9.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:103:13): time is correctly scaled ─────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_output(...) testWriteMdf.R:103:12
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─mdftracks::write.mdf(...)
   11.   ├─track.data[order(track.data[cn["t"]]), ]
   12.   ├─base::`[.data.frame`(...)
   13.   └─base::order(track.data[cn["t"]])
   14.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   15.       └─base:::FUN(X[[i]], ...)
   16.         ├─base::as.vector(xtfrm(x))
   17.         ├─base::xtfrm(x)
   18.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:128:3): Default channel is set correctly ──────────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_output(...) testWriteMdf.R:128:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─mdftracks::write.mdf(...)
   11.   ├─track.data[order(track.data[cn["t"]]), ]
   12.   ├─base::`[.data.frame`(...)
   13.   └─base::order(track.data[cn["t"]])
   14.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   15.       └─base:::FUN(X[[i]], ...)
   16.         ├─base::as.vector(xtfrm(x))
   17.         ├─base::xtfrm(x)
   18.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:153:3): 2D data has Z = 1.0 ───────────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_output(...) testWriteMdf.R:153:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─mdftracks::write.mdf(test.df[, c("uid", "t", "x", "y")], pos.columns = letters[24:25])
   11.   ├─track.data[order(track.data[cn["t"]]), ]
   12.   ├─base::`[.data.frame`(...)
   13.   └─base::order(track.data[cn["t"]])
   14.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   15.       └─base:::FUN(X[[i]], ...)
   16.         ├─base::as.vector(xtfrm(x))
   17.         ├─base::xtfrm(x)
   18.         └─base::xtfrm.default(x)
  
  ── ERROR (testWriteMdf.R:179:3): all columns specified ─────────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. ├─testthat::expect_output(...) testWriteMdf.R:179:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─mdftracks::write.mdf(...)
   11.   ├─track.data[order(track.data[cn["t"]]), ]
   12.   ├─base::`[.data.frame`(...)
   13.   └─base::order(track.data[cn["t"]])
   14.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   15.       └─base:::FUN(X[[i]], ...)
   16.         ├─base::as.vector(xtfrm(x))
   17.         ├─base::xtfrm(x)
   18.         └─base::xtfrm.default(x)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  ERROR (testWriteMdf.R:34:3): Data frames with columns id, t, x, y, z (MotilyLab) can be exported
            using default arguments (numeric columns)
  ERROR (testWriteMdf.R:41:3): Factor columns are converted to numeric
  ERROR (testWriteMdf.R:49:3): Output to file works
  ERROR (testWriteMdf.R:62:3): Output to file connection works when connection is closed
  ERROR (testWriteMdf.R:73:3): Output to connection works
  ERROR (testWriteMdf.R:103:13): time is correctly scaled
  ERROR (testWriteMdf.R:128:3): Default channel is set correctly
  ERROR (testWriteMdf.R:153:3): 2D data has Z = 1.0
  ERROR (testWriteMdf.R:179:3): all columns specified
  
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 15 ]
  Error: Test failures
  Execution halted