recodeflow recodes variables from multiple data sets into harmonized variables.
recodeflow has basic functions and templates required to define, recode, and harmonize variables for any dataset.
Recoding and cleaning your data is typically the most time consuming step of your project. Existing functions such as
dplyr:recode() work well but they are limited to recoding one variable at a time.
recodeflow package takes data cleaning and recoding one step further.
recodeflow allows you to recode multiple variables at the same time, and harmonize variables across similar databases even when the variables and variables' categories change.
recodeflow also helps to reduce errors, document the recode process, and ensures your new variables have labels and other metadata.
Even if your project has few variables,
recodeflow can save you time.
Use the worksheets
variable_details to list your variables and state how to recode the each variable.
Once your variables are defined, use
recodeflow functions to clean and recode your data. The main
recodeflow function is
rec_with_table which recodes variables within you dataset(s) based on how you've defined the variable in the worksheets
recodeflow package includes:
functions required to clean and recode variables.
variablesa list of variables to recode and
variable_detailsmapping of variables across datasets and a list of instructions for recoding variables.
We've also created the following documentation to help you understand
recodeflowfor your dataset,
recodeflowfunctions and templates.
recodeflow is used in packages that harmonize health surveys and health administrative databases.
cchsflow is a package that harmonizes variables across cycles of the Canadian Community Health Survey (CCHS). cchsflow is published.
raiflow is a package that will harmonize variables within the Resident Assessments Instruments (RAI) from various sources: Canada's Continuing Care Reporting System (CCRS) and Ontario's Resident Assessment Instrutment for Home Care (RAI-HC).
raiflow is currently underdevelopment.
Projects on the roadmap are at the Github repository recodeflow under the projects tab.
Please follow the recodeflow contribution guide if you would like to contribute to the
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.