context("FARS functions")
test_that("make_filename creates correct name", {
file_name <- make_filename(2013)
expect_that(file_name, is_a("character"))
expect_that(file_name, equals("accident_2013.csv.bz2"))
})
test_that("file is read ", {
df <- fars_read(system.file("accident_2013.csv.bz2", package = "fars"))
expect_that(df, is_a("data.frame"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.