suburbs_crime: HW2_function 'suburbs_crime' The function take the user...

Description Usage Arguments Value Examples

View source: R/suburbs_crime.R

Description

HW2_function suburbs_crime The function take the user inputs and plot the correlation in offence count between the two input suburbs from the data table

Usage

1
suburbs_crime(crime_data, offence_description, suburbs)

Arguments

crime_data

A data.table object with the following columns: "date" (POSIXct), "suburb" (chr), "postcode" (chr), "offence_level_1" (chr), "offence_level_2" (chr), "offence_level_3" (chr), "offence_count" (num).

offence_description

A character string of offence level 3.

suburbs

A two-element character vector. Each element is the name (UPPERCASE) of an SA suburb.

Value

A ggplot object showing the correlation in offence count between the two input suburbs.

Examples

1
suburbs_crime(datatable,"OFFENCES AGAINST PROPERTY", c("WEST BEACH", "ADELAIDE AIRPORT"))

lipingh/prfalipingh documentation built on May 29, 2019, 3:42 a.m.