Description Usage Arguments Details Value Examples
This function takes in "filename" as an argument, and first checks whether any file with name equal to "filename" exists.
1 | fars_read(filename)
|
filename |
A character string denoting the file to be read by fars_read. |
If the file does not exists, fars_read will stop and returns a message to indicate that the file does not exist.
If the file exists, fars_read will to read the file using the read_csv function from the readr package into a table named "data". It will then run the tbl_df function from the dplyr package to convert data into a data frame and return it as output to the function.
This function either returns a data frame containing data extracted from the defined file if it is present, or a message indicating the file is not found otherwise.
1 | fars_read(make_filename (2015))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.