context('Location Clean Function')
# load data from package
df <- NOAAearthquakes
df_clean <- eq_location_clean(df)
test_that('Is eq_location_clean(data) function working properly ?', {
expect_is(df_clean$LOCATION_NAME, 'character')
expect_equal(df_clean$LOCATION_NAME,
df_clean$LOCATION_NAME %>% # transform first to lower then title
stringr::str_to_lower() %>%
stringr::str_to_title())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.