[R] Surprise when mapping matrix to image
p.dalgaard at biostat.ku.dk
Fri Aug 27 08:46:57 CEST 2004
"Richard A. O'Keefe" <ok at cs.otago.ac.nz> writes:
> How about this addition to the documentation?
> "The x axis corresponds to the rows of the matrix (first on the left
> to last on the right). The y axis corresponds to the columns of the
> matrix (first at the bottom to last at the top)."
> Once you know what image() is _intended_ to do with a matrix,
> you can figure out the transposing and reversing you need for any
> other view. It's knowing you need to that's the problem.
Good idea, but perhaps not phrased sharply enough to catch the user's
eye. How about something like this:
"Notice that image() interprets a matrix as a table of f(x_i, y_j), so
the x axis corresponds to row number and the y axis to column number
(bottom to top)."
and then use Brian's one-liner in the examples section?
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help