This is the vignette documentation for the Corusera Week 4 exercise.
This function takes a path as a parameter reads the file into a data.frame object.\n
df<-CourseraWeek2::fars_read(CourseraWeek2::make_filename(2013)) head(df)
This function takes an integer representing the year and returns a string formatted to match the filename of the file for that year.\n
CourseraWeek2::make_filename(2013)
This function takes a list of years,and reads the data from the corresponding files into a single dataset.\n
df<-CourseraWeek2::fars_read_years(c(2013,2014)) head(df)
This function takes a list of years as a parameter and uses it to build the filenames for those years based on the appropriate naming convetion to generate a dataframe of the years and months of each accident summarised by month with each year as a separate variable.\n
CourseraWeek2::fars_summarize_years(c(2013,2014))
This function generates a map of the state with the location of the accidents. It uses parameters of state number and year.\n
CourseraWeek2::fars_map_state(10,2014)
I would put a map here but the maps package is a bit dodgy. It will run OK in the RStudio, but crashes when you Knit. This is a documented error with no solution...but it made it to CRAN. (Probably with the dontrun option)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.