That is what the last suggestion was and
it works, see previous message from me. Thx again.
I'm changing my code to use this method now.


On Sat, 22 Nov 2003,
Duncan Murdoch wrote:

> Date: Sat, 22 Nov 2003 17:10:39 -0500
> From: Duncan Murdoch <[EMAIL PROTECTED]>
> To: Al Piszcz <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [R] 1.8.1 behavior change?
>
> On Sat, 22 Nov 2003 15:14:31 -0500 (EST), you wrote:
>
> >
> >I would like to have one handle or reference to
> >'n' matrices. The matrices vary in size.
> >All data is floating point.
> >The input files have 21 columns and a varying
> >number of rows.
> >
> >I am open to any data structure that will
> >support this.
>
> Why not store them in a list, e.g.
>
> > stt <- list()
> > for (i in 1:3) stt[[i]] <- matrix(i, i, i)
> >
> > stt
> [[1]]
>      [,1]
> [1,]    1
>
> [[2]]
>      [,1] [,2]
> [1,]    2    2
> [2,]    2    2
>
> [[3]]
>      [,1] [,2] [,3]
> [1,]    3    3    3
> [2,]    3    3    3
> [3,]    3    3    3
>
> There are no restrictions on the shapes of the matrices that can be
> stored this way.  You access matrix i entry (j,k) as stt[[i]][j,k].
>
> Duncan Murdoch
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to