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
{{ message }}
Repository navigation
Key value lost when subsetting with non-existing key value and deselecting columns #3245
The latest dev seems to introduce a bug where key value is lost in following subsetting operation:
library(data.table)
dt<- data.table(
symbol= rep(c("A", "B", "C"), each=2),
group= rep(1:3, each=2),
x= rnorm(6),
key="symbol")
dt["A"]
#> symbol group x#> 1: A 1 0.01317652#> 2: A 1 -0.42823586dt["A", -"group"]
#> symbol x#> 1: A 0.01317652#> 2: A -0.42823586dt["D"]
#> symbol group x#> 1: D NA NAdt["D", -"group"]
#> symbol x#> 1: <NA> NA
Activity