[R] axis command and excel time format
Carmen Meier
carmei3 at web.de
Wed Nov 8 15:39:07 CET 2006
Gabor Grothendieck schrieb:
> Is the problem how to produce an axis with a given minimum tick,
> maximum tick and given number of ticks? In that case try this
yes but ... ;-)
I started with an plain R gui
library(zoo)
library(chron)
# input data
# z is from original example
mn <- times("23:00:00")
mx <- times("23:55:00")
n <- 12
z <-(1:50)
xt <- times(seq(mn, mx, length = n))
plot(z, xaxt = "n")
axis(1, xt, sub(":00$", "", xt))
The result is an X-axes with 23:00 at the left side nothing else at the
x-axis
That`s just the same problem as I got with further trials of my own
and a minor problem will be sub(":00$", "", xt)) if
times(seq(mn, mx, length = n)) will not result
xx:yy:00 values only (f.e n=17)
Regards Carmen
More information about the R-help
mailing list