Formats ID field into a standard format to support reporting.
Arguments
- df
data frame; Data frame containing the id_field to be formatted.
- id_field
character; The column name of the id field to be formatted.
Details
The input `id_field` is assumed to contain three parts: an alphabetic code, a dash separator, a sequential numeric second part, and an alphabetic third part.
Examples
# Get test data
db_risk <- rarr::db_risk
# Cleanup risk number for sorting
risk <- rarr::format_id(db_risk, "RISK_NO")