[S] [Q]Array subscripts

Ross Darnell (R.E.Darnell@newcastle.ac.uk)
Tue, 7 Jul 1998 15:26:49 GMT0BST


I am trying to understand the nature of indices used for subscripting
arrays especially the empty index.
I would like to create array indices that may have empty arguments
or be a vector of all possible levels for that array dimension.
e.g.
A[ , 2, 2]
or
A[1:7, 2, 2].

(actually I start with a vector (NA,2,2)) A[NA,2,2] doesn't work)

The indices cannot be a list like
ind
[[1]]
[1] 1 2 3 4 5 6 7
[[2]]
[1] 2
[[3]]
[1] 2

so it is not possible to ask for
A[ind]

So S doesn't like using lists as an argument to an array.

Can anyone tell me how to write code to properly specify correctly
the argument to an array index.

Thank you

Ross Darnell

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news