From vitosmail at rambler.ru  Sat Oct 17 10:45:10 2009
From: vitosmail at rambler.ru (Vitalie S.)
Date: Sat, 17 Oct 2009 10:45:10 +0200
Subject: [Rd] forwarded: bug (?) in cut.POSIXt with "breaks"=integer
In-Reply-To: <25926126.post@talk.nabble.com>
References: <4AD75795.9070308@ufl.edu> <25926126.post@talk.nabble.com>
Message-ID: <op.u1xrxkpgdacko8@tir-070312.staff.few.eur.nl>

On Fri, 16 Oct 2009 16:12:40 +0200, Ben Bolker <bolker at ufl.edu> wrote:

>
> PS a parallel problem seems to occur in cut.Date  ... cut.POSIXt and  
> cut.Date
> both allow
> breaks to be a single integer specifying the number of breaks, and both  
> call
>
>  if(is.null(labels)) levels(res) <- as.character(breaks[-length(breaks)])
> near the end of the function, which breaks (so to speak) if
> length(breaks)!=length(levels(res))-1
>
> I could keep working on a patch if requested, but probably won't  
> otherwise.
>
I believe it's an important issue. In plotting long time series grouping  
is indispensable.
Thank you, Ben, for working on that.

May I take this opportunity and propose an additional argument "by" to  
"cut" function. This would make cut similar to seq and cut.POSIXt (in the  
latter, intervals as "30 s" are allowed in breaks specification).  
Conceptually it's often simpler to think in terms of the length of  
interval than the number of intervals in "breaks".

Thanks,
Vitalie.

>   Ben Bolker
>
>
>
>
>
>



[Rd] forwarded: bug (?) in cut.POSIXt with "breaks"=integer
Vitalie S.