Created
December 23, 2016 14:50
-
-
Save krlmlr/0eb3d7ee09ab9459757feb00b3e8c90e to your computer and use it in GitHub Desktop.
Detect and manually fix missing join-by columns for dplyr
This file contains hidden or 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
| withCallingHandlers( | |
| remake::make(remake::list_targets()), | |
| message = function(e) { | |
| if (grepl("Joining, ", e$message)) { | |
| by_clause <- gsub("Joining(.*)\n", "\\1", e$message) | |
| clipr::write_clip(by_clause) | |
| srcref <- testthat:::find_first_srcref(sys.calls()[-1:-15]) | |
| srcfile <- attr(srcref, "srcfile")$filename | |
| rstudioapi::navigateToFile(srcfile, srcref[1], srcref[2]) | |
| stop("Insert by clause: ", by_clause) | |
| } | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment