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
This is a very edge case with an easy workaround but I ran into it using cut on multiple variables in a key.
d <- data.table(x=ordered(rep(1:3,each=5)),y=ordered(rep(c("B","A","C"),5),levels=c("B","A","C")),z=1:15)
d[, mean(z), keyby=.(x,y)] # Ordering is respected
d[, mean(z), keyby=.(I(x), I(y))] # Ordering of the y column is not respected
d[, mean(z), keyby=.(a=I(x), b=I(y))] # Ordering of the y column respected again now that the column names are different.
The text was updated successfully, but these errors were encountered:
This is a very edge case with an easy workaround but I ran into it using cut on multiple variables in a key.
The text was updated successfully, but these errors were encountered: