You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(data.table)
DT = data.table(a = 1:10)
DT[a < 5, a := 5L, verbose=TRUE]
# Detected that j uses these columns: a
# Assigning to 4 row subset of 10 rows
DT[a < 5, a := 5L, verbose=TRUE]
# Detected that j uses these columns: a
# Assigning to 10 row subset of 10 rows
In the second instance, there is (I reckon) no assignment taking place, so it shouldn't look like all rows were modified. Similarly...
DT[0, d := 1, verbose=TRUE]
# Detected that j uses these columns: <none>
# Assigning to 1 row subset of 10 rows
Here, I would expect to see numbers that better reflect what happened: d was initialized to NA on all rows. Ditto for DT[.(a=11L), on="a", f := 1, verbose=TRUE].
I'm interested in this because my colleagues are coming to R from Stata, which has this sort of feature (reporting counts of rows modified). I don't know if this should be characterized as a FR or bug.
The text was updated successfully, but these errors were encountered:
I was looking at...
In the second instance, there is (I reckon) no assignment taking place, so it shouldn't look like all rows were modified. Similarly...
Here, I would expect to see numbers that better reflect what happened:
d
was initialized to NA on all rows. Ditto forDT[.(a=11L), on="a", f := 1, verbose=TRUE]
.I'm interested in this because my colleagues are coming to R from Stata, which has this sort of feature (reporting counts of rows modified). I don't know if this should be characterized as a FR or bug.
The text was updated successfully, but these errors were encountered: