[R] turning list-elements into a vector

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jul 16 16:55:05 CEST 2003


Michael Kirschbaum wrote:

> Hi.
> Can anyone help me?
> 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"?)
> hope, you can help me
> thank you
> Michael
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help


  sapply(list, function(x) x[1,1])

Uwe Ligges




More information about the R-help mailing list