Re: [R] Problem with plot() and POSIXt dates

2007-01-05 Thread Gabor Grothendieck
Sorry, there was a missing parenthesis after the first statement. Here is the code again: x <- seq(from = as.POSIXct("2005-10-14"), to = as.POSIXct("2007-01-02"), by = "day") y <- as.numeric(x) plot(y ~ x, xaxt = "n") at <- x[seq(1, length(x), length = 5)] axis.POSIXct(1, at, at, "%y-

Re: [R] Problem with plot() and POSIXt dates

2007-01-05 Thread Gabor Grothendieck
We can force the X axis into the format of our choice by suppressing it in the plot and explicitly calling axis.POSIXct with our choice of format (see ?axis.POSIXct): x <- seq(from = as.POSIXct("2005-10-14"), to = as.POSIXct("2007-01-02"), by = "day" y <- as.numeric(x) plot(y ~ x, x

[R] Problem with plot() and POSIXt dates

2007-01-05 Thread COMTE Guillaume
So maybe i will finaly succeed asking the right way, Hy all, 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 timestamps. Here

Re: [R] Problem with plot() and POSIXt dates

2007-01-05 Thread Prof Brian Ripley
No attachment arrived: see the posting guide for handling attachments. But in any case the posting guide says If you are using an old version of R and think it does not work properly, upgrade to the latest version and try that, before posting. and your version of R is ancient. Note, 'before

[R] Problem with plot() and POSIXt dates

2007-01-05 Thread COMTE Guillaume
Hy all, 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

Re: [R] problem with plot() and POSIXt dates

2007-01-04 Thread Prof Brian Ripley
As the footer says PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. We can't help you with a problem we cannot reproduce, and random guessing is not going to be productive. On Thu, 4 Jan 2007

[R] problem with plot() and POSIXt dates

2007-01-04 Thread COMTE Guillaume
Hy all, 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. x