Skip to content

MagdyLaban/Building_R_Packages_Coursera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

farspackage

Travis build status

library(farspackage)

This package contains functions that read US National Highway Traffic Safety Administration’s Fatality Analysis Reporting System (FARS) data and summarize them

  • Reading in

    For reading the complete file use: fars_read(filename). It reads a CSV file and creates a tibble from it. Specify the filename using the filename argument . argument.

  • Making file name

    To make a file you have to use make_file(year) and specify an integer value for year argument .

  • Filtering

    The fars_read_years(years) function takes a numeric value as years argument and returns a list of tibbles consisting of two columns: MONTH and year.

  • Summarizing

    The fars_summarize_years(years) function summarizes accidents for the specified years, grouped by months.

  • Plotting

    To plot the data for the specified state in the specified year you have to use the fars_map_state(state.num, year) function . state.num represents the state number and it takes a numeric value and year represents which year the accidents had token place and it is a numeric value .

About

🔮 This repo contains the answer for the peer-to-peer assignment Building R Packages course on Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages