--- Begin Message ---
Hi Martin, I believe this can do the trick. Let me know otherwise.
Cheers

        testing <- matrix(rnorm(10),50,2)
        testing_list <- lapply(1:nrow(testing), function(j) testing[j,])


-----Mensagem original-----
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Em nome de Martin Spindler
Enviada em: quarta-feira, 1 de junho de 2011 04:46
Para: R-help@r-project.org
Assunto: [R] conversion of matrix into list

Dear all,



I have a matrix X which consists of 2 columns. I would like to convert
this
matrix into a list where every entry of the list consists of a single
row of
the matrix.

Does anyone have a suggestions how to manage this?



Thank you for your efforts in advance!



Best,



Martin




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--- End Message ---
"This message and its attachments may contain confidential and/or privileged 
information. If you are not the addressee, please, advise the sender 
immediately by replying to the e-mail and delete this message."

"Este mensaje y sus anexos pueden contener información confidencial o 
privilegiada. Si ha recibido este e-mail por error por favor bórrelo y envíe un 
mensaje al remitente."

"Esta mensagem e seus anexos podem conter informação confidencial ou 
privilegiada. Caso não seja o destinatário, solicitamos a imediata notificação 
ao remetente e exclusão da mensagem."
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to