R-beta: Three-dimensional arrays

Arne Kovac (A.Kovac@Bristol.ac.uk)
Wed, 2 Apr 1997 14:27:40 +0100 (BST)


Date: Wed, 2 Apr 1997 14:27:40 +0100 (BST)
From: Arne Kovac <A.Kovac@Bristol.ac.uk>
To: r-testers@stat.math.ethz.ch
Subject: R-beta: Three-dimensional arrays
Message-Id: <Pine.GSO.3.95.970402142238.27926B-100000@hannan>

I get a segmentation fault when I access labelled three-dimensional
arrays:

> new.array<-array((1:27),c(3,3,3))
> new.array[,1,]
     [,1] [,2] [,3]
[1,]    1   10   19
[2,]    2   11   20
[3,]    3   12   21
> label<-c("l1","l2","l3")                                                 
> new.array<-array((1:27),c(3,3,3),list(label,label,label))
> new.array[,1,]
zsh: segmentation fault  R

The same happens when I try to fix the first component with

> new.array[1,,]
zsh: segmentation fault  R

The third component works:

> new.array[,,1]
   l1 l2 l3
l1  1  4  7
l2  2  5  8
l3  3  6  9

Arne

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=