回覆︰ [FORGED] date format in xyplot
On 18/08/15 18:15, Christine Lee wrote:
Thanks Mr. Turner,
Please!!! Either "Rolf" or (if you insist on formality) *Dr.* Turner. :-)
This puzzles me. Why do we come out with different axis labels with the same command? Is this because of my R version or my computer?
<SNIP> It is most likely a *version* issue; in your version the default format is "%m-%e" whereas in mine it's "%b %d". Or something like that. Or it just might be a Windoze thing. (If Micro$oft can find a way to mess things up, they will.) I run *Linux*, as do all right-thinking people. Be that as it may, I have now looked at the help for xyplot() a little more carefully (when in doubt try reading TFM!!!) and saw that "format" must be supplied as part of the *scales* argument, which is a *list*. So try: xyplot(Abun ~ Date1 | ... etc. etc ..., scales=list(format="%B=%d")) and I think you'll get what you want. cheers, Rolf Turner
Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276