-
Notifications
You must be signed in to change notification settings - Fork 2
/
212update.txt
34 lines (23 loc) · 1.04 KB
/
212update.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Updating packages for 2.12.0
===========================
Package maintainers should be aware of the following changes scheduled
to appear in 2.12.0 sometime in October 2010.
Date-time classes
=================
Various changes are being made to the structure of the date-time
classes, the first of which is that as.POSIXct() returns an object of
class c("POSIXct", "POSIXt"), and analogously for as.POSIXlt() -- the
ordering has been reversed.
This has no consequences for users of S3 classes, but the kludge of
using S3 class "POSIXct" as slot in an S4 class finally meets its
comeuppance.
Rather than setting classes directly, the recommended way is to use in
the package's namespace (for packages not depending on R >= 2.11.0)
if(getRversion() < "2.11.0")
.POSIXct <- function(xx, tz = NULL)
structure(xx, class = c("POSIXt", "POSIXct"), tzone = tz)
and then create POSIXct objects by something like
x <- .POSIXct(x)
z <- .POSIXct(z, attr(x, "tzone"))
Future changes are planned to allow for the other date-time classes
"Date" and "difftime".