[R] Multidimensional numeric structure
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Apr 21 17:28:05 CEST 2004
MMarques Power wrote:
> I know this is going to be a dumb question but...
> I need a cube like struture , I have 3 dimensions well defined which
> I need to define a value in the cube something like
> Cube [][][] in C+ ou Java ...
> I have thought in making a matrix and then an array...
> and even the other way around.
> The problem is that the I have the indexs and wanted to access direcly
> the element both reading or writing without to much effort....
>
> But how can "access" a specific number only by their index ?
> of course It is possible to make a specific calc in order to reach the
> place I needed ....
> But what for ? if I have the correct indexs directly ?
>
> Is "R" capable of building such a struture besides adding up
> matrixes and or arrays ?
> Did I miss anything ?
>
> Thanks in advance
> Marco Marques
>
You can index a 3d array A with
A[x,y,z]
Uwe Ligges
More information about the R-help
mailing list