Description Usage Arguments Value Note Examples
View source: R/fars_functions.R
This is a simple function that, reads a csv which name will be included as the solely argument in the function. If the csv does not exist, the execution of the function will stop by throwing a relevant message.
1 | fars_read(filename)
|
filename |
A character string specifying the name of the csv that will be imported in R |
This function returns the imported file in R in a tibble format (class "tbl_df")
Please note that in this function uses the read_csv function from readr package and the tbl_df function from the dplyr package.
Additionally to above, you should have in mind that the files to be imported in R should be either placed in the working directory or the path to be included as part of the parameter (input) of the function.
1 | ## Not run: fars_read("accident_2013.csv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.