Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on= could accept unnamed columns in i #1375

Closed
mattdowle opened this issue Oct 5, 2015 · 0 comments
Closed

on= could accept unnamed columns in i #1375

mattdowle opened this issue Oct 5, 2015 · 0 comments
Assignees
Milestone

Comments

@mattdowle
Copy link
Member

e.g. ad hoc joins

require(data.table)
X = data.table(a=1:3,b=4:6,c=c("foo","bar","baz"))
X[.(5), on="b"]
# Error in bmerge(i, x, leftcols, rightcols, io, xo, roll, rollends, nomatch,  : 
#   Internal error. icols[0] is NA

desired output

X[.(b=5), on="b"]
#    a b   c
#1: 2 5 bar

and where one join column has the same name but not the other :

X = data.table(A=1:3,b=4:6,c=c("foo","bar","baz"))
Y = data.table(A=2:4, B=5:7)
X[Y, on=c("A",b="B")]
# Error in forderv(x, by = rightcols) : 
#   'by' value -2147483648 out of range [1,3]
X[Y, on=c(A="A",b="B")]
#    A b   c
#1: 2 5 bar
#2: 3 6 baz
#3: 4 7  NA
@mattdowle mattdowle added this to the v1.9.8 milestone Oct 5, 2015
@arunsrinivasan arunsrinivasan self-assigned this Oct 11, 2015
arunsrinivasan added a commit that referenced this issue Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants