Skip to contents

Search for variants of a status code (stored in google sheets), create a boolean flag in the dataset, and replace the status variant in the title with the standardized version. The flag variable is named SCODE.X (e.g. REGIONAL.X).

Usage

flag_and_keep(df, title = "TitleTxt6", s.code, gs_status_codes = NULL)

Arguments

df

A compensation dataframe

title

Which version of the title string to use (defaults to "TitleTxt6")

s.code

Any of the unique status.qualifier strings from df.status (e.g. "REGIONAL")

gs_status_codes

Optional status-code crosswalk data frame; if NULL, loaded from the bundled snapshot.