[R] 1.8.1 behavior change?
Al Piszcz
apiszcz at solarrain.com
Sat Nov 22 23:19:45 CET 2003
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 <dmurdoch at pair.com>
> To: Al Piszcz <apiszcz at solarrain.com>
> Cc: r-help at stat.math.ethz.ch
> 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
>
More information about the R-help
mailing list