I think I have worked out the problem, and because it may trouble
others, I take the liberty of explaining it on the mailing list.
When diff is applied to a vector of POSIXt values returned by strptime,
the units depend upon the smallest interval in the input vector. If that
interval is less th
Prof Brian Ripley wrote:
> You are throwing away the clue in your use of as.numeric.
>
> First. strptime returns a POSIXlt value, which you will convert to
> POSIXct when you do arithetic (using diff()). Why are you doing that? So
>
>> foodate<-factor(c("1/7/1991","1/8/1991","1/8/1991","3/8/19
You are throwing away the clue in your use of as.numeric.
First. strptime returns a POSIXlt value, which you will convert to POSIXct
when you do arithetic (using diff()). Why are you doing that? So
> foodate<-factor(c("1/7/1991","1/8/1991","1/8/1991","3/8/1991"))
> diff(strptime(foodate,"%d/%m
3 matches
Mail list logo