Skip to content
Prev 254846 / 398498 Next

Preserving the class of POSIXt objects

On Fri, Mar 25, 2011 at 09:14:50PM +0000, Kenn Konstabel wrote:
As Gabor Grothendieck pointed out to me when I tried to read a value as
numeric, then force it to POSIXct:

| This line in the code above produces an invalid object:
| class(df$time) <- "POSIXct"
| 
| It should be:
| class(df$time) <- c("POSIXct", "POSIXt")

Peace,
david