Hi Phil,
Well thank you very much for this detailed explanation. It will help
me when summarizing information over periods of time using either
summarize (Hmisc) or summaryBy (doBy). Until now, doing so resulted in
"mean" time for each "group" being transformed as a number of seconds,
as
Stavros Macrakis wrote:
> I have documented some of these issues in my email "Semantics of
> sequences in R" (22/02/2009 3:42 PM) and other emails, and I have
> proposed to write code to resolve them, but have not received a warm
> reception.
>
you said 'it *is* a mess', didn't you? warm re
Stavros Macrakis wrote:
> It does seem sensible that median and quantile would work for the
> POSIXct, Date, and other classes for which they are logically
> well-defined, but strangely enough, they do not (except for odd-length
> input). The summary function has a special case (summary.POSIXct)
>
It does seem sensible that median and quantile would work for the
POSIXct, Date, and other classes for which they are logically
well-defined, but strangely enough, they do not (except for odd-length
input). The summary function has a special case (summary.POSIXct)
which does the straightforward, o
illiam Dunlap
> Sent: Tuesday, March 10, 2009 11:37 AM
> To: 'r-help@r-project.org'
> Subject: Re: [R] puzzled by math on date-time objects
>
> Your problem arises in R 2.8.1 (and 2.9.0-devel, but not 2.7.0) when
> length(POSIXct object) is even, because median(POSIXct ob
Your problem arises in R 2.8.1 (and 2.9.0-devel, but not 2.7.0) when
length(POSIXct object) is even, because median(POSIXct object)
passes a POSIXct object to median.default, which calls
sum() in the even length case.
> median( as.POSIXct(Sys.time()))
[1] "2009-03-10 10:28:46 PDT"
> median( as.P
6 matches
Mail list logo