View source: R/fn_prepare_suspect_data.R
fn_prepare_suspect_data | R Documentation |
Checks that the minimum necessary variables are present and calculates additional attributes needed for fn_gpsmart()
.
fn_prepare_suspect_data(input_suspects_raw)
input_suspects_raw |
A data frame with at least one row and 14 columns:
|
The function will return an error if the input does not contain the correct columns in the correct format.
Season variables are based on Southern Hemisphere.
A data frame the same as the input with 7 additional columns:
event_date_time_random
Random date-time generated for event nodes.
daypart
The day part of the node. A factor with levels "daytime", "evening", "night" or "all".
weekpart
The week part of the activity node. A factor with levels "weekday", "weekend" or "both".
spring
Whether the node dates include any days in spring (1 = yes, 0 = no)
summer
Whether the node dates include any days in summer (1 = yes, 0 = no)
autumn
Whether the node dates include any days in autumn (1 = yes, 0 = no)
winter
Whether the node dates include any days in winter (1 = yes, 0 = no)
Sophie Curtis-Ham
fn_prepare_input_crime()
checks that the minimum necessary variables are present and creates the input_crime
data frame for use in fn_gpsmart()
.
fn_gpsmart()
filters and ranks input_suspects
based on their probability of committing the input_crime
.
## Not run: data(example_input_suspects_raw) fn_prepare_supect_data(example_input_suspects_raw) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.