tests/testthat/test-nyc_flights.R

library(testthat)
library(tsbox)

test_that("minimal example works", {
  skip_if_not_installed("nycflights13")

  library(dplyr)
  library(nycflights13)
  dta <- weather %>%
    select(origin, time = time_hour, temp, humid, precip) %>%
    ts_long()

  expect_s3_class(dta, "tbl_df")
  expect_s3_class(ts_ts(ts_pc(dta)), "ts")
})

Try the tsbox package in your browser

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

tsbox documentation built on May 31, 2023, 6:41 p.m.