clean_utah.RdThis function cleans a Utah RSA-911 dataset, based on the standard data structure.
clean_utah(
data,
aggregate = TRUE,
unidentified_to_0 = TRUE,
remove_desc = TRUE,
remove_strictly_na = TRUE,
clean_specials = NULL
)The Utah RSA-911 dataset.
TRUE or FALSE. Defaults to TRUE, when TRUE, rows are aggregated to include only unique combinations of participants, year, and quarter.
TRUE or FALSE. Defaults to TRUE, when TRUE, variables where unidentified is represented by 9, values are converted to 0.
TRUE or FALSE. Defaults to TRUE, when TRUE, description variables are removed to minimize redundancy.
TRUE or FALSE. Defaults to TRUE, when TRUE, variables that contain only NA values are removed.
A character vector of name(s) of variables with special characters to be cleaned. New, separate variables for each value space will be appended to end of dataset with the the following naming convention: original_variable_name_Place1, original_variable_name_Place2, etc. Defaults to NULL. Note that if many are listed, cleaning process will be very slow.
A cleaned data frame, with incorrect, blank, messy values replaced, additional, helpful variables created, and unnecessary variables removed.