test_that("check", {
expect_identical(check_dts(dts_data), dts_data)
data <- data.frame(DateTime = as.Date(c("2001-01-01", "2001-01-02")), Value = c(1,2))
expect_identical(check_dts(data), data)
is.na(data$DateTime[1]) <- TRUE
expect_identical(check_dts(data, colname = "Value"), data)
expect_error(check_dts(data, colname = c("Value", "Value2")),
"`data` column names must include 'DateTime', 'Value' and 'Value2'")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.