tests/testthat/test_circulate.R

context("check circulate")

test_that("circulate works propertly", {
  x = 1:10
  expect_equivalent(circulate(x), c(2:10, 1))
  expect_equivalent(circulate(x, n = 2), c(3:10, 1:2))
  expect_equivalent(circulate(x, n = 3), c(4:10, 1:3))
})

Try the hero package in your browser

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

hero documentation built on July 26, 2023, 5:11 p.m.