[R] Why does plot() ignore the data type for axis labels?
Stiffler
zoubidoo at hotmail.com
Tue Feb 19 23:40:46 CET 2008
Mark Difford wrote:
>
>>> I was wondering why the plot() command ignores the datatype when
>>> displaying axis labels...
>
> plot() doesn't ignore the datatype:
> [...]
> plot(x,y) calls xy.coords(), which recasts x as: x = as.double(x), which
> is fine, since x is (also/primarily) numeric.
>
> HTH, Mark.
>
>
Thanks for the explanation Mark.
If integers are being recast as doubles R is ignoring/overriding the user's
choice of data-type. There may be good reasons for doing that internally
(uniformity, code re-use etc) , but it is not what I'd expect as an end-user
--- neither ?plot nor ?xy.coords seem to mention that coordinates need to be
floating point numbers.
Best regards,
Stiffler
--
View this message in context: http://www.nabble.com/Why-does-plot%28%29-ignore-the-data-type-for-axis-labels--tp15562325p15576369.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list