create a status code flag and remove string from title
Source:R/06-gen-status-codes.R
flag_and_remove.RdSearch for variants of a status code (in the status.codes crosswalk), create a boolean flag in the dataset, and remove the status qualifier from the title. The flag variable is named SCODE.X (FORMER.X, INTERIM.X, etc.).
In cases where the status is the full title (e.g. 'ex officio') replace the variant with the standardized version and keep it.
Examples
if (FALSE) { # \dontrun{
x <-
c( "IMMEDIATE PAST CHAIR",
"FORMER CEO (EXIT 12/31/17)",
"PAST PRESIDENT",
"OUTGOING CEO",
"PRESIDENT ELECT",
"BOARD MEMBER (START OCT)",
"TREASURER - BEGINNING 8/2018",
"DIRECTOR (AS OF 2/22/18)",
"INTERIM PRES",
"ACTING DIRECTOR",
"PAST INTERIM PRESIDENT" )
remove_date( x )
} # }