This function replaces a single month worth of crime data that has previously been extracted from a year-list object.

cs_replace_month(.data, month, monthData)

Arguments

.data

A year list object

month

A string name or abbreviation of a month, or its numeric value. Acceptable inputs include, for example, "January", "january", "Jan", "jan", and 1.

monthData

A tibble containing a single month worth of crime data.

Value

An updated year-list object.

See also

Examples

# load example year-list object load(system.file("testdata", "yearList17.rda", package = "compstatr", mustWork = TRUE)) # extract May may17 <- cs_extract_month(yearList17, month = 5) # replace yearList17 <- cs_replace_month(yearList17, month = 5, monthData = may17) yearList17 <- cs_replace_month(yearList17, month = "May", monthData = may17)