Nothing
library(testthat)
library(tsbox)
test_that("arithmetic operations work properly", {
expect_equal(
fdeaths + mdeaths,
ts_ts(ts_df(fdeaths) %ts+% mdeaths)
)
expect_equal(
fdeaths - mdeaths,
ts_ts(ts_df(fdeaths) %ts-% mdeaths)
)
expect_equal(
fdeaths * mdeaths,
ts_ts(ts_df(fdeaths) %ts*% mdeaths)
)
expect_equal(
fdeaths / mdeaths,
ts_ts(ts_df(fdeaths) %ts/% mdeaths)
)
# functional test
library(dplyr)
a <- bind_rows(
mutate(ts_tbl(ts_c(mdeaths, fdeaths)), id2 = "a"),
mutate(ts_tbl(ts_c(mdeaths, fdeaths)), id2 = "b")
)
expect_s3_class(a %ts/% a, "data.frame")
z <- ts_df(ts_c(mdeaths, fdeaths) %ts/% 1)
expect_s3_class(z, "data.frame")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.