Re: [R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
On Fri, Nov 21, 2008 at 6:12 PM, Douglas Bates <[EMAIL PROTECTED]> wrote: > R uses column-major ordering of multidimensional arrays, as in > Fortran, unlike the row-major ordering of C multidimensional arrays. > This is because the numerical linear algebra code used in R is from > the Eispack, Linp

Re: [R] matlab style of storing arrays compared to R

2008-11-21 Thread Douglas Bates
R uses column-major ordering of multidimensional arrays, as in Fortran, unlike the row-major ordering of C multidimensional arrays. This is because the numerical linear algebra code used in R is from the Eispack, Linpack, BLAS, Lapack family of Fortran subroutine packages. Even when implementation

[R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
Hi I am trying to figure out, if the matlab style of linear indexing of an array is the same as in R. i.e. when x <- array( 1:24, dim=c(2,3,4) ) x[3] > 3 and if the same is true in matlab, assuming that x[n1,n2,n3] in R returns the same as y(n1,n2,n3) when y is a matrix in matlab I found the