[R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread John McKown
I'm so confused! Why does is.na() report TRUE for a POSIXlt date time of 2014-03-09 02:00:00 ? q [1] 2014-03-09 02:00:00 is.na(q) [1] TRUE as.POSIXct(q) [1] NA dput(q) structure(list(sec = 0, min = 0L, hour = 2, mday = 9L, mon = 2L, year = 114L, wday = 0L, yday = 67L, isdst = 0L, zone =

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread Duncan Murdoch
On 30/07/2014 1:08 PM, John McKown wrote: I'm so confused! Why does is.na() report TRUE for a POSIXlt date time of 2014-03-09 02:00:00 ? q [1] 2014-03-09 02:00:00 is.na(q) [1] TRUE as.POSIXct(q) [1] NA dput(q) structure(list(sec = 0, min = 0L, hour = 2, mday = 9L, mon = 2L, year =

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread John McKown
On Wed, Jul 30, 2014 at 12:18 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 30/07/2014 1:08 PM, John McKown wrote: I'm so confused! Why does is.na() report TRUE for a POSIXlt date time of 2014-03-09 02:00:00 ? q [1] 2014-03-09 02:00:00 is.na(q) [1] TRUE as.POSIXct(q) [1] NA

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread William Dunlap
I should have mentioned that I tried other time stamps, generated the same way as q above. How did you generate q and in what time zone were you? Note that 2am on 9 March 2014 is when 'daylight savings time' started in the parts of the US where it is observed. Does 2am exist or do we jump

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread Jeff Newmiller
Isn't that a timestamp that doesn't exist in standard US timezones? Maybe use a timezone that doesn't consider daylight savings (like Etc/GMT+5)? --- Jeff NewmillerThe . . Go Live...

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread John McKown
On Wed, Jul 30, 2014 at 12:54 PM, William Dunlap wdun...@tibco.com wrote: I should have mentioned that I tried other time stamps, generated the same way as q above. How did you generate q and in what time zone were you? I got it from an MS-SQL data base which is maintained by some

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread John McKown
OK, daylight saving time, may be be cursed, is definitely my problem. Strangely, the DB has data for time , 0100, 0200, 0400, 0500, ... 2300. It is closed source, so I have _no_ idea how this happened. And I cannot report bugs because it is no longer supported. The encoding is a 4 character

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread William Dunlap
I meant what R commands did you use to change the database's version of the time/date object to the R version? Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Jul 30, 2014 at 11:07 AM, John McKown john.archie.mck...@gmail.com wrote: On Wed, Jul 30, 2014 at 12:54 PM, William Dunlap

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread John McKown
Probably not the best, but here: con - odbcConnect(BMC); timezone - Sys.timezone(); # query=paste0(select CONVERT(smalldatetime,Int_Start_Date,11) as Int_Start_Date,, CONVERT(smalldatetime,CASE WHEN Int_Start_Time is NULL then '00:00' , else

Re: [R] is.na() == TRUE for POSIXlt time / date of 2014-03-09 02:00:00

2014-07-30 Thread arun
Not able to reproduce the problem. str(q) # POSIXlt[1:1], format: 2014-03-09 02:00:00  is.na(q) #[1] FALSE sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-unknown-linux-gnu (64-bit) A.K. On Wednesday, July 30, 2014 1:10 PM, John McKown john.archie.mck...@gmail.com wrote: I'm so