[R] converting 3D array to a data-frame (with coordinate-columns x, y, z)

Martin Batholdy batholdy at googlemail.com
Wed Oct 5 18:20:29 CEST 2011


Hi,


I am still struggling with three dimensional arrays.

Now I would like to convert a three dimensional array into a data-frame with the coordinate-columns: x, y, z and a value-column.

And I definitely don't want to loop over every element, since this would be very resource intensive for the actual data-set.


Are there any specific functions that are helpful for this task?



example-array:

x <- array(1:27, dim=c(3,3,3,1))



thanks!


More information about the R-help mailing list