Skip to content

Instantly share code, notes, and snippets.

@dpastoor
Created August 27, 2015 02:00
Show Gist options
  • Save dpastoor/75b9eb10c05a87017f86 to your computer and use it in GitHub Desktop.
Save dpastoor/75b9eb10c05a87017f86 to your computer and use it in GitHub Desktop.
check for missing column names
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)
}
@dpastoor
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment