When I want the vector of the males, I use the following:

ag =
data.table(gender=rep(c("M","F"),10),age=seq(10,20,length.out=20),key="gender")
ag["M",age]$age

Just for the elegance:  did I miss some method to get this without the
trailing $age?

Dieter

--
View this message in context: 
http://r.789695.n4.nabble.com/Syntax-ag-M-age-age-tp4313006p4313006.html
Sent from the datatable-help mailing list archive at Nabble.com.
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to