Fix pipeline when barrier column is all NAs part 2 #1435
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Followup to #1346. Set answer code 13 to NA before checking if col is all NA.
Changelog
variables.R
Fixes
In rare cases,
vaccine_barriers <- ifelse(vaccine_barriers == "13", NA, vaccine_barriers)
orvaccine_barriers <- ifelse(input_data$V15b == "13", NA, input_data$V15b)
will make a column all NA when it wasn't before. This happens when the only non-NA responses have answer code "13".