[Rd] Request: difftime method for cut()

From: Gustaf Rydevik <gustaf.rydevik_at_gmail.com>
Date: Thu, 10 Jun 2010 15:39:05 +0200

Hi all,

The recent change in 2.11 that made as.numeric() return false on difftime-objects broke some of my code that calculated age classes of individuals using cut(). While this was no big thing to fix for me, it might be wise
to provide a cut.difftime method to  stop other old code from breaking. I'm guessing something as simple as

cut.difftime<-function(x,...){
x<-as.numeric(x)
cut(x,...)
}

would suffice.

best regards,
Gustaf

--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 10 Jun 2010 - 13:47:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jun 2010 - 18:11:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive