Re: [R] How to make a 2-dim array being "interpreted" as an array rather than as a matrix

From: Erik Iverson <>
Date: Tue, 04 Mar 2008 18:41:38 -0600

One more note:

>> Is there any way in which I can "force" a2 to being "interpreted" as
>> having class "array" rather than "matrix" so that foo will work on
>> a2???

Maybe try?

a3 <- structure(1:10, dim = c(2,5), class = "array")

Then class(a3) gives "array", and is.matrix and is.array are both still TRUE. Erik mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 05 Mar 2008 - 00:44:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 01:30:20 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive