[R] matlab style of storing arrays compared to R

From: Rainer M Krug <r.m.krug_at_gmail.com>
Date: Fri, 21 Nov 2008 10:41:12 +0200


I am trying to figure out, if the matlab style of linear indexing of an array is the same as in R. i.e.


x <- array( 1:24, dim=c(2,3,4) )
> 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 following reference

And it seems to be the same, but another source says it is different. Could somebody confirm, if it is the same?



Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 21 Nov 2008 - 08:44:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 21 Nov 2008 - 17:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive