Created
August 27, 2015 02:00
-
-
Save dpastoor/75b9eb10c05a87017f86 to your computer and use it in GitHub Desktop.
check for missing column names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gather_idx <- match(gather_cols, names(data)) | |
if (anyNA(gather_idx)) { | |
missing_cols <- paste(gather_cols[is.na(gather_idx)], collapse = ", ") | |
stop("Unknown column names: ", missing_cols, call. = FALSE) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from tidyverse/tidyr@487025b