[R] formatting POSIXlt object as strip labels in lattice plot

John Field JohnField at ozemail.com.au
Fri Nov 23 04:42:16 CET 2007


Dear list,

I'm plotting a lattice plot

xyplot(Volume ~ Weight | as.character(DateTime))

where DateTime is a POSIXlt object.  This produces strip labels in 
the format e.g. "2007-11-15 23:15:00" and panels are plotted in the 
correct order.  I'd prefer a format "15 Nov 23:15", but if I use 
format(DateTime,format="%d %b %H:%M") to do the conversion, then the 
panels are ordered according to the day of the month, ie the 
character string "15 Nov 23:15" etc.

How do I get labels in the required format, but panels in the correct order?

Thanks,
John

=========================
John Field Consulting Pty Ltd
10 High Street, Burnside SA 5066
Phone 08 8332 5294 or 0409 097 586
Fax   08 8332 1229
Email  JohnField at ozemail.com.au



More information about the R-help mailing list