Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
The function fars_read
gets as input the path of the file name to load
into R. It checks whether the file exists and if not, stops.
If the file exists, with correct format, it is loaded into R with the
read_csv
function from the readr
package and messages,which
type each column is, are suppressed.
At least, the function uses the tbl_df
function from the dplyr
package, although there is no need to do that.
1 | fars_read(filename)
|
filename |
A string containing the path for the file |
Erros occur by files which exist but are not in (zipped) csv format, or files which are in csv format but do not have the default delimiters. Error occurs if more than one filename is passed.
A tibble dataframe containing the information of the csv file
1 2 | # filename <- make_filename(2013)
# accident_2013 <- fars_read(filename)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.