Something like this?

  myvec <- sapply(list.of.mat, function(x) x[i, j])

If all the matrices are of the same dimension, it might be easier to make
them into an array, and just "slice" through the array.

Andy



> -----Original Message-----
> From: Michael Kirschbaum [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 16, 2003 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: [R] turning list-elements into a vector
> 
> 
> 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]]
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
> 

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, ...{{dropped}}

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to