Q:

list of data.table: filter by variable

I have a list of data.tables
library(data.table); set.seed(42)
l <- list(data.table(id=1:5, x=rnorm(5)), data.table(id=1:5, x=rnorm(5)))

> l
[[1]]
   id          x
1:  1  1.3709584
2:  2 -0.5646982
3:  3  0.3631284
4:  4  0.6328626
5:  5  0.4042683

[[2]]
   id           x
1:  1 -0.10612452
2:  2  1.51152200
3:  3 -0.09465904
4:  4  2.01842371
5:  5 -0.06271410

each of which with the same IDs. 
I would like to extract from each element only ID 3, but would not know how this works. I thought of lapply(l, ) but don't know how to continue. Is there a standin-variable for each list element, say xx, so I could use lapply(l,subset(xx, id==3))?

A:

Using data.table subsetting (that should be faster): 
lapply(l, "[", id == 3)

