From dmurdoch at pair.com  Wed Jun  4 03:15:35 2003
From: dmurdoch at pair.com (dmurdoch@pair.com)
Date: Wed Jun  4 02:15:48 2003
Subject: [Rd] Re: cut.POSIXt problem in R 1.7.1 beta (PR#3181)
Message-ID: <200306040015.h540FZ2b024678@pubhealth.ku.dk>

On Tue, 3 Jun 2003 06:45:41 -0700 (PDT), you wrote:

>The following cut.POSIXt problem is from R 1.7.1 beta which I downloaded from uwo.   
>
>Here x is a sequence of dates and b are those breakpoints that represent the 9th of each month.
>
>   > x <- seq(ISOdate(2003,6,1),by="day",length=100)
>   > b <- x[format(x,"%d")=="09"]
>   > cut(x,b)
>   Error in sort(breaks) : `x' must be atomic
>
>This problem appears in earlier versions of R too.

This one is easy.  Here's a patch to fix it:

diff -r1.45.2.1 datetime.R
632c632
<       breaks <- as.POSIXlt(breaks)
---
>       breaks <- as.POSIXct(breaks)


[Rd] Re: cut.POSIXt problem in R 1.7.1 beta (PR#3181)
dmurdoch@pair.com