Re: [Rd] Date vs date (long)

2007-09-21 Thread Terry Therneau
Peter et al Thanks for the comments on dates. Some of the respondents missed the point, by showing ways that I could work around the problems, when my main argument is that one shouldn't have to work around problems. So I hereto present round 2 of the debate. 1 Postulates a. In my 35 yea

Re: [Rd] Date vs date (long)

2007-09-17 Thread Gabor Grothendieck
On 9/17/07, Terry Therneau <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck > > as.Date(10) > You can define as.Date.numeric in your package and then it will work. zoo > has done that. > > library(zoo) > as.Date(10) > > This is also a nice idea. Although adding to a package is possible, it is > n

Re: [Rd] Date vs date (long)

2007-09-17 Thread Peter Dalgaard
Terry Therneau wrote: > b. "I'd advise against numeric operation on difftime objects in general, > because of the unspecified units." > If I carry this idea forward, the R should insist that I specify units for > any variable that corresponds to a physical quantity, e.g. "height" or > "weight

Re: [Rd] Date vs date

2007-09-15 Thread Peter Dalgaard
Prof Brian Ripley wrote: >>> Arguably, it should (Is this a difftime object? Which units?). >>> I'd advise against numeric operation on difftime objects in general, >>> because of the unspecified units. These are always "days" when working >>> with Date objects, but with general time objects it is

Re: [Rd] Date vs date

2007-09-15 Thread Prof Brian Ripley
On Fri, 14 Sep 2007, hadley wickham wrote: >>> 3. temp <- as.Date('1990/1/1') - as.date('1953/2/5') >>> sqrt(temp) >>> Error in Math.difftime(temp3) : sqrtnot defined for "difftime" objects >>> >>> Minor bug: no space before the word 'not' >>> Major: this shouldn't fail. >>> >>> >>

Re: [Rd] Date vs date

2007-09-14 Thread Gabor Grothendieck
On 9/14/07, Terry Therneau <[EMAIL PROTECTED]> wrote: > I wrote the date package long ago, and it has been useful. In my current > task > of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm > removing the explicit dependence on 'date' objects from the expected survival >

Re: [Rd] Date vs date

2007-09-14 Thread hadley wickham
> > 3. temp <- as.Date('1990/1/1') - as.date('1953/2/5') > > sqrt(temp) > > Error in Math.difftime(temp3) : sqrtnot defined for "difftime" objects > > > > Minor bug: no space before the word 'not' > > Major: this shouldn't fail. > > > > > Arguably, it should (Is this a difftime obje

Re: [Rd] Date vs date

2007-09-14 Thread Peter Dalgaard
Terry Therneau wrote: > I wrote the date package long ago, and it has been useful. In my current > task > of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm > removing the explicit dependence on 'date' objects from the expected survival > routines so that they better

[Rd] Date vs date

2007-09-14 Thread Terry Therneau
I wrote the date package long ago, and it has been useful. In my current task of reunifying the R (Tom Lumley) and Splus (me) code trees for survival, I'm removing the explicit dependence on 'date' objects from the expected survival routines so that they better integrate. Comparison of 'date