Maybe
lapply(l,function(x){x[1,1]})
or
unlist(lapply(l,function(x){x[1,1]}))
does what you want?
Benno
Am 17.Nov.2010 um 15:01 schrieb soeren.vo...@eawag.ch:
> m <- matrix(1:9, nrow=3, dimnames=list(LETTERS[1:3], letters[1:3]))
> l <- list(m1=m, m2=m*2, m3=m*3)
> l[[
try this:
m <- matrix(1:9, nrow=3, dimnames=list(LETTERS[1:3], letters[1:3]))
l <- list(m1=m, m2=m*2, m3=m*3)
lapply(l, "[", 1, 1)
# or
sapply(l, "[", 1, 1)
I hope it helps.
Best,
Dimitris
On 11/17/2010 3:01 PM, soeren.vo...@eawag.ch wrote:
A list contains several matrices. Over all matr
2 matches
Mail list logo