tests/testthat/test-nth.R

test_that("nth", {
  x = 1:10

  expect_equal(nth(x,1),1)
  expect_equal(nth(x,5),5)
  expect_equal(nth(x,-1),10)
  expect_equal(nth(x,-2),9)
})

Try the tidyfst package in your browser

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

tidyfst documentation built on June 22, 2024, 9:29 a.m.