[datatable-help] Subsetting Bug?

Michael Smith my.r.help at gmail.com
Fri Nov 7 09:51:38 CET 2014


Shouldn't the last two commands below yield identical results?

DT <-
    data.table(
        CIK = c("0000060512", "0000839087"),
        FileDate = c(8680, 10081))
CIK = "0000839087"
DT[CIK == (CIK)][FileDate <= 10104]

          CIK FileDate
1: 0000839087    10081

DT[CIK == (CIK) & FileDate <= 10104]

          CIK FileDate
1: 0000060512     8680
2: 0000839087    10081


More information about the datatable-help mailing list