tests/testthat/test-write_tps.R

stimuli <- demo_stim()

test_that("works", {
  tpath <- tempfile(fileext = ".tps")
  tps <- write_tps(stimuli, tpath)
  sink <- capture.output(g_array <- geomorph::readland.tps(
    tpath, specID = "ID", warnmsg = FALSE
  ))

  w_array <- tems_to_array(stimuli)

  expect_equivalent(dim(g_array), dim(w_array))
  expect_equal(dim(w_array), c(189, 2, 2))

})
debruine/webmorphR documentation built on Aug. 15, 2022, 3:51 p.m.