POSIXct : firstStream_byUCnDPMb, lastStream_byUCnDPMb, firstStream_byUCnDP, lastStream_byUCnDP logical : mobile, isLastOccurOfUser_perD, isFirstOccurOfUser_perD ---------------------------------------------- POSIXct : firstStream_byUCnDPMb, lastStream_byUCnDPMb, firstStream_byUCnDP, lastStream_byUCnDP, firstStream_byUCnD, lastStream_byUCnD logical : mobile, isLastOccurOfUser_perD, isFirstOccurOfUser_perD, isFirstStream_byUCnD, isLastStream_byUCnD cUsing <- c("userid", "month", "country", "product", "mobile" , "isFirstOccurOfUser_perD", "isFirstStream_byUCnD", "firstStream_byUCnD", "firstStream_byUCnDP", "firstStream_byUCnDPMb" , "isLastOccurOfUser_perD", "isLastStream_byUCnD", "lastStream_byUCnD", "lastStream_byUCnDP", "lastStream_byUCnDPMb") DT.Sampl.u[.("0000023b43b307354943ae74caff3886", "DE", as.Date("2013-04-01")), cUsing, with=FALSE] DT.Sampl.u[.("3754da008362fd48d33e80bb3e628335", c(unique(country)), as.Date("2013-05-01")), cUsing, with=FALSE, nomatch=0L] DT.Sampl.u[.("3754da008362fd48d33e80bb3e628335")][, cUsing, with=FALSE] DT.Sampl.u[.("3754da008362fd48d33e80bb3e628335")][isFirstStream_byUCnD != isFirstOccurOfUser_perD, cUsing, with=FALSE] testing <- DT.Sampl[.("3754da008362fd48d33e80bb3e628335"), c(kCols_UCnD, "lastStream_byUCnDPMb", "firstStream_byUCnDPMb"), with=FALSE] ------------- cUsing <- c("userid", "month", "country", "product", "mobile" , "isFirstOccurOfUser_perD", "isFirstStream_byUD", "firstStream_byUD", "firstStream_byUCnDP", "firstStream_byUCnDPMb" , "isLastOccurOfUser_perD", "isLastStream_byUD", "lastStream_byUD", "lastStream_byUCnDP", "lastStream_byUCnDPMb") DT.Sampl.u[isFirstStream_byUD != isFirstOccurOfUser_perD, cUsing, with=FALSE] DT.Sampl.u[isLastStream_byUD != isLastOccurOfUser_perD, cUsing, with=FALSE] DT.Sampl.u[.("00000c79adcd9d1572cf74603e6b7152", as.Date("2013-09-01")), cUsing, with=FALSE] DT.Sampl.u[.("3754da008362fd48d33e80bb3e628335", as.Date("2013-05-01")), cUsing, with=FALSE, nomatch=0L] DT.Sampl.u[.("3754da008362fd48d33e80bb3e628335")][, cUsing, with=FALSE] testing <- DT.Sampl[.("3754da008362fd48d33e80bb3e628335"), c(kCols_UD, "lastStream_byUCnDPMb", "firstStream_byUCnDPMb"), with=FALSE] unique(testing) unique(testing, by=key(testing)) unique(testing, by=NULL) unique(testing, by=names(testing)) unique( )[order(lastStream_byUCnDPMb)] DT.Sampl[][isFirstStream_byUCnD != isFirstOccurOfUser_perD] 838: 3754da008362fd48d33e80bb3e628335 26 839: 375b8f4f67c10580d1d692eda612c0f8 27 840: 3742a8e972febcf87362f4eb0e3cea32 28 841: 375b7b59ae49b9c4570bc7b184d00c79 30 842: 37428a800c9d00d3c534ada8d99822dd 45