[datatable-help] Subsetting columns in data.table
Berto
cubalibro at gmail.com
Tue Nov 20 21:54:20 CET 2012
Matthew Dowle wrote
> othercols = setdiff(names(DT5),c("x","y"))
> DT5[y<=3 & Reduce(`&`,lapply(DT5[,othercols,with=FALSE],`<=`,7)),
> max(y), by=x]
> x V1
> 1: a 3
> 2: b 1
Many thanks, Matthew!
That's exactly what I was looking for.
Congratulations for the great package and thank you for the advice!
Berto
--
View this message in context: http://r.789695.n4.nabble.com/Subsetting-columns-in-data-table-tp4649736p4650221.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list