@geospacedman I've been thinking about a package to define some generally useful generics for new vector classes
1
1
@hadleywickham I keep having to copy as.data.frame.POSIXct when I make a new vector class. But feel like giving up on DFs for data.tables...
1
@geospacedman I think you can have most of the benefits of data tables within data.frames
1
1
@hadleywickham dplyr on a data frame with a new S3 vector class fails - in a data table it works :)
2
@geospacedman if had generic method to define hashing strategy for new vector classes, would be easy to support arbitrary classes in dplyr
1
1
@hadleywickham @geospacedman we need to make this internal enough yet extensible, and hashing is not enough, we also need equality op.
1
1
@romain_francois how do we handle equality for POSIXct where you also need to take tz into account?
2
@hadleywickham I thought the double value identified unambiguously the time, and the tz is just for when formatting.
2
@romain_francois nope :( as.numeric(ISOdate(2014, 1, 1, tz = "GMT"));
as.numeric(ISOdate(2014, 1, 1, tz = "America/Chicago"))
2
1
@hadleywickham I get a time difference of 6 hours which is what I expect.
2
@romain_francois @hadleywickham Correct as Hadley used ISOdate, you probably want ISOdatetime or as.POSIXct there. Whole area a minefield.
Jul 19, 2014 路 5:51 PM UTC
1



