[R] Matrix conversion question

Christos Hatzis christos at nuverabio.com
Fri Mar 9 17:01:10 CET 2007


Try

split(x, row(x)) 

-Christos

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of 
> Johannes Graumann
> Sent: Friday, March 09, 2007 10:30 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Matrix conversion question
> 
> Hello,
> 
> Please help - I'm blanking on this ...
> 
> I have a matrix like this:
> 
>      [,1] [,2]
> [1,]    1    2
> [2,]    1    3
> [3,]    2    3
> 
> and would like to have a list of vectors, where a vector 
> contains the entries in a matrix row ...
> 
> Can somebody nudge me to the place I need to go?
> 
> Thanks, Joh
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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