Description Usage Arguments Examples
floorPOSIXct
1 | floorPOSIXct(x, units = "days", offset = "0 days", ...)
|
x |
The POSIXct vector |
units |
How to cut the values. The units are partially matched in
|
offset |
To use in the case where a cut occurs at a inconvenient date (see examples). |
1 2 3 4 5 6 7 8 | data(exses)
x <- exses$stat$time - 304*(24*3600)
plot(x, x, type = 'l')
lines(x, floorPOSIXct(x, '2days'), col = 'blue', type = 's')
# To force the cut to occur on the 1st January
lines(x, floorPOSIXct(x, '2days', '1d'), col = 'lightblue', type = 's')
lines(x, floorPOSIXct(x, 'days'), col = 'red', type = 's')
lines(x, floorPOSIXct(x, '0.5d'), col = 'green', type = 's')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.