[R] turning list-elements into a vector

Douglas Bates bates at stat.wisc.edu
Wed Jul 16 16:45:50 CEST 2003

"Michael Kirschbaum" <emkiba at gmx.de> writes:

> I want to create a vector from specific matrix-elements( e.g.[1,1])
> these matrices are elements of a list.

> Is there any possibility to work without a loop? (e.g. with "lapply"?)

Sounds like you want

lapply(mlist, "[", i = 1, j = 1)

where mlist is your list of matrices.

More information about the R-help mailing list