Try this:
t(sapply(lst1, '[', 1:max(sapply(lst1, length
On Sat, Sep 3, 2011 at 3:37 PM, wizykid wrote:
> Hi there.
>
> I went through the manual but I couldn't find a solution for my problem.
>
> I have list like this one :
>> lst1
> [[1]]
> [1] 0 1 2 3
>
> [[2]]
> [1] 0 1 5
>
> [[3]]
> [1]
Thank you so much Pete. Have a good one as you made mine
--
View this message in context:
http://r.789695.n4.nabble.com/Saving-a-list-as-a-Matrix-tp3788274p3788414.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org m
Hi there.
I went through the manual but I couldn't find a solution for my problem.
I have list like this one :
> lst1
[[1]]
[1] 0 1 2 3
[[2]]
[1] 0 1 5
[[3]]
[1] 2 3 4
and I want to save it as Matrix in Matlab mat format like :
0 1 2 3
0 1 5 0
2 3 4 0
can any body help me ? Appreciate your
wizykid wrote:
>
> Hi there.
>
> I went through the manual but I couldn't find a solution for my problem.
>
> I have list like this one :
>> lst1
> [[1]]
> [1] 0 1 2 3
>
> [[2]]
> [1] 0 1 5
>
> [[3]]
> [1] 2 3 4
>
> and I want to save it as Matrix in Matlab mat format like :
> 0 1 2 3
> 0 1
4 matches
Mail list logo