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

[R-Forge #5672] error when merging zero row data.table #24

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Closed

[R-Forge #5672] error when merging zero row data.table #24

arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Garrett See; Assigned to: Arun ; R-Forge link

The following did not give an error in 1.9.2, but does in 1.9.3. Using svn revision 1263:

library(data.table)
# data.table 1.9.3  For help type: help("data.table")
a <- data.table(BOD, key="Time")
b <- data.table(BOD, key="Time")[Time < 0] # zero row data.table
merge(a,b, all=TRUE) # works fine
#    Time demand.x demand.y
#1:    1      8.3       NA
#2:    2     10.3       NA
#3:    3     19.0       NA
#4:    4     16.0       NA
#5:    5     15.6       NA
#6:    7     19.8       NA
merge(b,a, all=TRUE) # error
# Error in setcolorder(dt, c(setdiff(names(dt), end), end)) :
#   neworder is length 2 but x has 3 columns.

Originally reported on the mailing list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant