[R] Problem with plot() and POSIXt dates
g.comte at alliance-ir.net
Fri Jan 5 11:04:54 CET 2007
I'm plotting graphs using plot() function, they are on X axes POSIX dates:
"POSIXt" "oldClass" "POSIXct" "POSIXlt"
I can't figure out why sometimes it prints the month and days and sometimes it prints the unix timestamp.
It appens usually when the xlim is short like only some days.
xlim is settled as a POSIXt like this
"2006-12-30 17:25:44 CET" "2007-01-02 03:16:51 CET"
On the graph it prints : 1167500000 and 1167700000 instead of dates.
And the result gives a x axes in unix timestamps as if the plot function didn't recognize that it is a timestamp but just an integer.
What am i missing, since R sees itself that it is time stamps and not integer when xlim is enougth large, how do i tell the plot function to see these numbers as POSIXt?
I put an attachement, inside there is an example that demonstrate what i experience (hope it won't be deleted, it is a tar.gz archive made using debian under
R version 2.1.0, 2005-04-18, i386-pc-linux-gnu
attached base packages:
 "methods" "stats" "graphics" "grDevices" "utils" "datasets"
24 rue Martre
Tel : 01 40 87 48 06
Fax : 01 40 87 48 14
More information about the R-help