Description Usage Arguments Details Value Note Examples
View source: R/fars_functions.R
This function imports a .csv file. The parameter filename
is meant to
be passed a string from the function make_filename()
. This function is
used within the fars_read_years()
function.
1 | fars_read(filename)
|
filename |
A character string giving the name of the .csv file to be imported. |
This function first checks to make sure the file exists, and then,
if it does exist, uses readr::read_csv()
to import the file, suppressing
import messages and the progress bar in the process. Finally, it uses
dplyr::tbl_df()
to convert the imported file to be a tibble data frame.
This function returns a tibble.
if a .csv file matching the filename
you supply does not exist,
the function will stop execution with message
"file filename
does not exist."
1 | fars_read("accident_2015.csv.bz2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.