# Test if the dataset meets the many packages universe requirements
# Report missing values
test_that("missing observations are reported correctly", {
expect_false(any(grepl("^n/a$", {{{dab}}}[["{{{dat}}}"]])))
expect_false(any(grepl("^N/A$", {{{dab}}}[["{{{dat}}}"]])))
expect_false(any(grepl("^\\s$", {{{dab}}}[["{{{dat}}}"]])))
expect_false(any(grepl("^\\.$", {{{dab}}}[["{{{dat}}}"]])))
expect_false(any(grepl("N\\.A\\.$", {{{dab}}}[["{{{dat}}}"]])))
expect_false(any(grepl("n\\.a\\.$", {{{dab}}}[["{{{dat}}}"]])))
})
# Date columns should be in mdate class
test_that("Columns are not in date, POSIXct or POSIXlt class", {
expect_false(any(lubridate::is.Date({{{dab}}}[["{{{dat}}}"]])))
expect_false(any(lubridate::is.POSIXct({{{dab}}}[["{{{dat}}}"]])))
expect_false(any(lubridate::is.POSIXlt({{{dab}}}[["{{{dat}}}"]])))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.