From ripley at stats.ox.ac.uk  Tue Jan  6 12:21:52 2004
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Tue Jan  6 12:20:19 2004
Subject: [Rd] seq.POSIXt with by="DSTday" (PR#6212)
Message-ID: <20040106112152.F3A3210439@slim.kubism.ku.dk>

This is deliberate, to avoid excessively long computations in
validate_tm in src/main/datetime.c.  You could increase the limits in

    if(tm->tm_mday < -1000 || tm->tm_mday > 1000) return -1;


On Tue, 30 Dec 2003 deville.yves@wanadoo.fr wrote:

> Full_Name: Yves DEVILLE
> Version: 1.7.1
> OS: linux-gnu
> Submission from: (NULL) (213.203.71.194)
> 
> 
> There seems to be a problem with seq.POSIXt with by="DSTday" and length>=999. In
> the result, 
> NA are produced for indexes >=999 (no such problem with by="day" or "x days")  
> 
> Begins <- as.POSIXct(strptime("1995-09-03", format="%Y-%m-%d"))
> 
> ## Works (whatever be Begins)
> Length <- 998
> Ends <- seq(from=Begins, length=Length, by="DSTday")[Length]
> 
> ## returns NA in Ends (whatever be Begins)
> Length <- 999
> Ends <- seq(from=Begins, length=Length, by="DSTday")[Length]
> 
> ## Works
> Length <- 499
> Ends <- seq(from=Begins, length=Length, by="2 DSTdays")[Length]
> 
> ## Returns NA
> Length <- 500
> Ends <- seq(from=Begins, length=Length, by="2 DSTdays")[Length]
> 
> Best regards,
> 
> Yves Deville
> 
> R.version
> 
> platform i686-pc-linux-gnu
> arch     i686             
> os       linux-gnu        
> system   i686, linux-gnu  
> status                    
> major    1                
> minor    7.1              
> year     2003             
> month    06               
> day      16               
> language R
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] seq.POSIXt with by="DSTday" (PR#6212)
ripley@stats.ox.ac.uk