From ripley at stats.ox.ac.uk  Fri Apr 16 18:23:01 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Apr 16 18:23:08 2004
Subject: [Rd] summary() with argument of class difftime (PR#6780)
In-Reply-To: <20040416162046.67F7F10495@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.44.0404161722360.18068-100000@gannet.stats>

Where does it say that summary() can be applies to difftime objects?

On Fri, 16 Apr 2004 hosking@watson.ibm.com wrote:

> Full_Name: J. R. M. Hosking
> Version: 1.9.0
> OS: Windows 2000
> Submission from: (NULL) (129.34.20.23)
> 
> 
> > dt<-as.Date("2002-03-04")-as.Date("2001-02-03")
> > jstr(dt)
> difftime(units:days)(1) 394 
> > summary(dt)
> Error in Summary.difftime(..., na.rm = na.rm) : 
>         sum not defined for difftime objects
> 
> 
> 
> When x is of class difftime, either sum(x) should be permitted or summary(x)
> should not try to compute the mean.
> 
> (R 1.9.0, Windows binary from CRAN)

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] summary() with argument of class difftime (PR#6780)
Prof Brian Ripley