Last active
February 27, 2026 15:19
-
-
Save mikelove/92fc23d64ca0cf533ad8cdc096dd4811 to your computer and use it in GitHub Desktop.
Compact left_join.DataFrame
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
| # adapted from DFplyr | |
| # ignoring rownames and GroupedDataFrame functionality... | |
| left_join.DataFrame <- function(x, y, by = NULL, ...) { | |
| if (is.null(by)) { | |
| by <- intersect(names(x), names(y)) | |
| if (length(by) == 0) { | |
| rlang::abort("`by` must be supplied when `x` and `y` have no common variables.") | |
| } | |
| message("Joining with `by = ", deparse(by), "`") | |
| } | |
| S4Vectors::merge(x, y, by = by, sort = FALSE, ...) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks! I'll work on adding/testing this next week (my end of week got backed up with deadlines)