format_id | R Documentation |
Formats ID field into a standard format to support reporting.
format_id(df, id_field)
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. |
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.
The input data frame with a new field formatted according the function's format rules.
# Get test data db_risk <- rarr::db_risk # Cleanup risk number for sorting risk <- rarr::format_id(db_risk, "RISK_NO")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.