context("eq_clean")
test_that("eq_clean_data builds date variable correctly",{
df <- data.frame(YEAR = 2018, MONTH = 8, DAY = 1:31, LATITUDE = NA, LONGITUDE = NA)
expect_identical(
range(eq_clean_data(df)$DATE),
as.Date(c("2018-08-01", "2018-08-31"), format = "%Y-%m-%d")
)
})
test_that("eq_location_clean works",{
expect_identical(
head(eq_location_clean(data.frame(LOCATION_NAME = "Country: Text Label "))$LOCATION_NAME),
"Text Label"
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.