[R] summary(difftime(...))

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Apr 15 14:36:00 CEST 2004


I M S White wrote:

> Is there any way to get a numerical summary of the values of a difftime
> object? E.g.
> 
> TimeToWean <- difftime(WeanDate, BirthDate, units = "days")
> 
> I can repeat
> 
> sum(TimeToWean == 20)
> 
> with as many other values are needed to build up a frequency table,
> but is there a simpler way in R version 1.8.1?


Are you looking for table() ?

Uwe Ligges




More information about the R-help mailing list