Skip to content

x,y vs row,column

1 message · yudi@pop3.ucd.ie

#
This is standard not just for 'stats people', but also in Fortran, 
which by default assumes  numbers are read column-wise.
(In computer memory column-wise numbers are contiguous.)

In matrix algebra we always refer to the row of the matrix first
e.g., (x,y)-element refers to row-x-and-column-y element. 

So the mismatch between the matrix reading/printing/referencing
and the Cartesian plot as in image() is not unique of R. The
geometric mismatch is actually necessary so we can still refer
to the same (x,y) element in the matrix and in the plot.
x and y in image will only affect the axes, the image itself is 
determined by matrix z, i.e., you could do > image(z).
To fix? well, just remember rows of a matrix are image()'d 
column-wise.


------------------------------
Yudi Pawitan: yudi at ucd.ie
Department of Statistics, UCD
Dublin 4, Ireland
Ph : 353-1-706 7641
Fax: 353-1-706 1186
------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._