tests/testthat/test-speed.R

test_that("speed works", {
  expect_equivalent(round(track_speed(c(0, 0, 1, 0), c(0, 1, 1, 0),
                                      ISOdate(2001, 1, 1) + c(1:4)), digits = 2L),
                    c(NA, 110574.39, 111302.65, 156899.57))
})

Try the traipse package in your browser

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

traipse documentation built on Oct. 10, 2022, 9:06 a.m.