The is the Week 4 Homework of the Coursera Course Build R Package. This package mainly as two parts: functions and data.
There are 5 functions in the packages.
This function is used to Read .csv file. This is a function that, by default, reads .csv file. If the file does not exist in the repository, the function will stop. If the file exists, the function will return the Data Frame Tbl of the .csv file.
This function is used to return String the name of the .csv.bz2 file. This is a function return the .csv.bz2 file name with the given year.
Parse column month and column year from the data set specified by year. This is a function returning the month and year column from the specified data set. The data set is specified by year, the year the data set is for. This function can also take a list or a vector of years.
The count of records for the month of the specified year. This is a function returning the data frame of monthly record counts for the specified year/years. The first column of the returned data frame is the month, the second column is the record counts of the corresponding month for the passed year/years.
The map with the state ploted on the map. This is a function of creating map, the map plots the location of the record on the mao for the specified state and year.
There are 3 data sets are lazy loaded with the package:
+accident_2013 -accident_2014 +accident_2015
These data are .csv file. The data is mainly used by the examples in the package. These data can be accessed by calling the name directly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.