Equivalent to lapply(a, function(x) x[,1])

Viewed 64

Is there a terser equivalent to this code?

a <- list(matrix(1,3), matrix(2,3))
lapply(a, function(x) x[,1])

I want to fill in the ???

lapply(a, `[`, ???)
1 Answers
Related