We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
test1 <- data.table(x=1:5, z=5:1) test2 <- copy(test1) setkey(test1, z) y <- c(1,3,2,3,2)
One data.table has a key in it, the other doesn't.
tmp1 <- test1[,list(x=sum(x)), by=y] key(tmp1) # [1] "y" tmp2 <- test2[,list(x=sum(x)), by=y] key(tmp2) # NULL
It turns out the key would be replaced by the by term, though it is not sorted at all.
by
tmp1 # y x #1: 1 5 #2: 3 4 #3: 2 3 #4: 3 2 #5: 2 1 tmp2 # y x #1: 1 1 #2: 3 6 #3: 2 8
version 1.9.2
The text was updated successfully, but these errors were encountered:
a8843b2
arunsrinivasan
No branches or pull requests
One data.table has a key in it, the other doesn't.
It turns out the key would be replaced by the
by
term, though it is not sorted at all.version 1.9.2
The text was updated successfully, but these errors were encountered: