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-
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
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
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
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
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
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