[Rd] seq.POSIXt with by="DSTday" (PR#6212)

deville.yves at wanadoo.fr deville.yves at wanadoo.fr
Tue Dec 30 10:27:37 MET 2003


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



More information about the R-devel mailing list