Description Usage Arguments Value See Also Examples
This function extracts a given month from a list containing 12 tibbles - one per month - for additional data cleaning prior to collapsing the list. Since months are ordered alphabetically in the year list objects, this function makes the process of extracting a particular month more intuitive.
1 | cs_extract_month(.data, month)
|
.data |
A list containing monthly crime data |
month |
A string name or abbreviation of a month, or its numeric value. Acceptable inputs include, for example, "January", "january", "Jan", "jan", and 1. |
A tibble containing a single month worth of crime data.
1 2 3 4 5 6 | # load example year-list object
load(system.file("testdata", "yearList17.rda", package = "compstatr", mustWork = TRUE))
# extract May
may17 <- cs_extract_month(yearList17, month = 5)
may17 <- cs_extract_month(yearList17, month = "May")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.