tests/testthat/test-zmate.R

test_that("zmate works", {
  expect_equal(zmate(c(0,1,4,6)), c(0,1,3,7))
  expect_equal(zmate(c(2,4,5,10)), c(0,1,4,6))
  expect_equal(zmate(c(0,1,3,5,6)), c(0,1,2,4,7))
  expect_equal(zmate(c(0,3,4,5,8)), c(0,1,3,4,8))
  expect_equal(zmate(c(0,1,2,4,5,7,8)), c(0,1,4,5,6,7,9))
  expect_equal(zmate(c(0,1,2,3,5,6)), c(0,1,2,3,4,7))
  expect_true(is.na(zmate(c(0,3,7))))
  expect_true(is.na(zmate(0:5)))
})

Try the musicMCT package in your browser

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

musicMCT documentation built on June 21, 2026, 9:06 a.m.