Message-ID: <x2ekiinuzv.fsf@biostat.ku.dk>
Date: 2004-11-25T09:22:28Z
From: Peter Dalgaard
Subject: Creating lists from matrices
In-Reply-To: <41A752C2@webmail2.ofir.dk>
Alexander Sokol <alexandersokol at ofir.dk> writes:
> [1] "A" "B" "C"
> [[2]]
> [2] "D" "E" "F"
> [[3]]
> [3] "G" "H" "I"
>
> That is, each row of the original matrix is turned into a vector and these
> vectors are collected to a list. How do I do this?
split(my.matrix, row(my.matrix))
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907