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))

})

Try the webmorphR package in your browser

Any scripts or data that you put into this service are public.

webmorphR documentation built on June 2, 2022, 5:07 p.m.