Hi Erich,
why do you convert the POSIXt object back to numeric?
Try:
> basetime <- as.POSIXct("2016-04-24 12:00:00 CEST",origin =
"1582-10-14", tz = "GMT")
+ > basetime
[1] "2016-04-24 12:00:00 GMT"
> basetime + (0:9)*3600
[1] "2016-04-24 12:00:00 GMT" "2016-04-24 13:00:00 GMT"
[3] "2016-04-24 14:00:00 GMT" "2016-04-24 15:00:00 GMT"
[5] "2016-04-24 16:00:00 GMT" "2016-04-24 17:00:00 GMT"
[7] "2016-04-24 18:00:00 GMT" "2016-04-24 19:00:00 GMT"
[9] "2016-04-24 20:00:00 GMT" "2016-04-24 21:00:00 GMT"
> scale_x_continuous(minor_breaks = basetime + (0:9)*3600)
<ScaleContinuousPosition>
Range:
Limits: 0 -- 1
>
However, I can't reproduce your error:
> basetime <- as.numeric(as.POSIXct("2016-04-24 12:00:00 CEST",origin =
"1582-10-14", tz = "GMT"))
scale_x_continuous(minor_breaks = as.POSIXct(basetime + (0:9)*3600,origin=
"1970-01-01",tz="GMT"))
> + <ScaleContinuousPosition>
Range:
Limits: 0 -- 1
Anyways, try just normal addition subtraction with POSIXt objects (in
seconds).
Good luck and please put your next question in form that makes it easier
for someone to help you. See:
http://adv-r.had.co.nz/Reproducibility.html
Cheers
Brian