-
Notifications
You must be signed in to change notification settings - Fork 982
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
data.table in j results in an error #1473
Comments
I think these lines in
Note that Not sure why Can we just switch the order of the tests? i.e. just test |
@eantonya note the following:
We expect A more elaborate example is necessary. Consider
I think
But
So perhaps the error runs a bit deeper than just in |
@MichaelChirico completely agree that the square bracket versions' classes are the correct ones as far as my expectations go. |
Been poking around on this a bit. I think a key difference is |
It doesn't error anymore, but not sure if the results are exactly how we should expect them to be. dt1 = data.table(a = 1)
dt2 = data.table(b = 1:2)
dt2[, dt1, by = b]
# b dt1
# <int> <data.table>
#1: 1 <multi-column>
#2: 2 <multi-column>
dt2[, dt1[], by = b]
# b a
# <int> <num>
#1: 1 1
#2: 2 1 Using AsIs class (pending PR) is quite related in such use cases. |
Is the difference in the two cases related to a special route by which the symbol Somehow, a value for the plain symbol dt2[,dt1]
## Error: j (the 2nd argument inside [...]) is a single symbol but column name 'dt1' is not found. If you intended
## to select columns using a variable in calling scope, please try DT[, ..dt1]. The .. prefix conveys one-level-up
## similar to a file system path.
dt2[, dt1, by = b]
## b dt1
## 1: 1 <multi-column>
## 2: 2 <multi-column> Seems like whatever branch of code allows the symbol Obviously it's a different branch than is used in cases where dt2[, dt1[]]
## a
## 1: 1
dt2[, dt1[], by = b]
## b a
## 1: 1 1
## 2: 2 1
dt2[, (dt1)]
## a
## 1: 1
dt2[, (dt1), by = b]
## b a
## 1: 1 1
## 2: 2 1
|
Not sure what's going on here, some weird bug:
The text was updated successfully, but these errors were encountered: