[R] About 5.1 Arrays
Stephen Liu
satimis at yahoo.com
Fri Nov 5 11:00:20 CET 2010
Hi Gerrit,
Thanks for your advice.
- snip -
> A[i, j, k] is the value of the element in position (i,j,k) of array A. In
> other words, it is the entry in row i, column j, and "layer" k (if one
> wants to think of A as a cuboidal grid).
Sorry I can't follow. Could you pls explain in more detail.
e.g.
> z <- 0:23
> dim(z) <- c(3,4,2)
> dim(z)
[1] 3 4 2
> z
, , 1
[,1] [,2] [,3] [,4]
[1,] 0 3 6 9
[2,] 1 4 7 10
[3,] 2 5 8 11
, , 2
[,1] [,2] [,3] [,4]
[1,] 12 15 18 21
[2,] 13 16 19 22
[3,] 14 17 20 23
TIA
B.R.
Stephen L
---------------------------------------------------------------------
AOR Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany
Fax: +49-(0)641-99-32109 http://www.uni-giessen.de/cms/eichner
---------------------------------------------------------------------
More information about the R-help
mailing list