Cryptic error message in case of misused xxx_join(..., by=c(...)) #1192
This is no bug report rather a request to give more informative error messages.
If the following misuse of the join functions is undertaken the error messages are somewhat cryptic:
data2 <- data_frame(a=1:3) data1 <- data_frame(a=1:3, c=3:5) left_join(data1, data2, by=c("a","a")) ## Error in left_join_impl(x, y, by$x, by$y) : attempt to set index 0/0 in SET_STRING_ELT
While the input should have been ...
left_join(data1, data2, by=c("a"="a")) ## Source: local data frame [3 x 2] ## ## a c ## 1 1 3 ## 2 2 4 ## 3 3 5
... a syntax error that is easy to do and hard to find.
The text was updated successfully, but these errors were encountered:
if this is at all helpful, here's where I ran into
here was the offending call
I added a defensive statement in my