fars_read: FARS functions These functions provided are using data from...

Description Usage Arguments Details Value Examples

Description

This function reads CSV file and opens it in a data frame form.

Usage

1
fars_read(filename)

Arguments

filename

A character string giving the file name with its location. This parameter generated by fars_map_state.

Details

This function opens CSV file from FARS. If the file with the specified name does not exist the function gives an error message"file....does not exist". Function suppress any warning messages that can be generated by read_csv function used to open CSV file. It contributes to the function fars_read_years.

Value

This function returns a data frame that containes data from CSV file. If file does not exist it returns an error message.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(dplyr)
library(readr)
library(magrittr)
library(tidyr)
library(dplyr)
library(maps)
library(graphics)

fars_read("accident_2015.csv.bz2")
## End(Not run)

olb1605/FARS_Package_Coursera documentation built on May 23, 2019, 4:05 a.m.