fars_read: Read a CSV file and create it a data frame tbl

Description Usage Arguments Value Warning Examples

Description

This is a simple function that reads a csv(common separated values) file and create a data frame from it, with cases corresponding to rows(lines) and variables to columns(fields) in the file. tbl objects only print a few rows and all the columns that fit on one screen, describing the rest of it as text.

Usage

1
fars_read(filename)

Arguments

filename

A charater string of the name of file to be imported or a relative path to a file. If file does not exist in the working directory or specific directory, function will be stopped with an error message.

Value

Only prints the first 10 rows and the columns that fit on screen. The rest of columns which were not shown in tbl are listed below tbl as text.

Warning

Function will skip year if file with data for year does not exists

Examples

1
2
3
4
 library(dplyr)
 library(readr)

 ## Not run: fars_read("accident_2013.csv")

2radix5/firstTestPackage documentation built on May 20, 2019, 4:13 p.m.