[R] About 5.1 Arrays

Gerrit Eichner Gerrit.Eichner at math.uni-giessen.de
Fri Nov 5 09:43:55 CET 2010


On Fri, 5 Nov 2010, Stephen Liu wrote:


[snip]

> "0" is counted as 1 object.
Of course! It is a number like any other.

> Does "object length" mean the total number of objects/entries?
Yes.

> Please help me to understand follow;
>
> "For example if the dimension vector for an array, say a, is c(3,4,2) then there
> are 3 * 4 * 2 = 24 entries in a and the data vector holds them in the order
> a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]."
>
> I don't understand;
> a[1,1,1], a[2,1,1], ..., a[2,4,2]
[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).

Hth  -- Gerrit

---------------------------------------------------------------------
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