Recoding for missingness using R ("rebasing")
There's often a need with surveys to recoding values to missing on a case-by-case basis (commonly referred to as rebasing a variable). This can involve the responses to another question in the survey.
- For example, everyone in the survey was asked which US State they live in, but the study covered China, the UK and the USA.
- For example, all respondents were asked which of the following brands they would consider purchasing, but really they should only be exposed to the brands if they were aware of them (ie: like a brand funnel)
Recoding is best expressed via Crunch Automation. See: Recoding: case-level missing & valid values ("rebasing")
Remember you can run Crunch Automation from within R, See: Running Crunch Automation within R