[R] Odp: conversion of matrix into list

Petr PIKAL petr.pikal at precheza.cz
Wed Jun 1 10:01:47 CEST 2011


Hi
 
> 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.

e.g.

split(mat, 1:nrow(mat))

Regards
Petr

> 
> Does anyone have a suggestions how to manage this?
> 
> 
> 
> Thank you for your efforts in advance!
> 
> 
> 
> Best,
> 
> 
> 
> Martin
> 
> 
> 
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list