tests/testthat/test-eafdiff3d.R

test_that("eafdiff3d", {
  lin <- read_datasets("lin.S.txt")
  sph <- read_datasets("sph.S.txt")
  setcol <- ncol(lin)
  # This may stop working once we filter uninteresting values in the C code directly.
  DIFF <- eafdiff(lin, sph)
  x <- as.matrix(read.table("lin.S-sph.S-diff.txt.xz", header = FALSE))
  x[, setcol] <- x[, setcol] - x[, setcol+1]
  dimnames(x) <- NULL
  expect_equal(DIFF[, 1:setcol], x[, 1:setcol])
})

Try the moocore package in your browser

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

moocore documentation built on July 12, 2026, 5:06 p.m.