Re: [R] Strptime/ date time classes

From: Mark Difford <mark_difford_at_yahoo.co.uk>
Date: Mon, 14 Jul 2008 08:57:43 -0700 (PDT)

Hi Caroline,

>> is.na(strptime("19810329012000",format="%Y%m%d%H%M%S")) >> [1] TRUE

>> The problem was to do with daylight saving time.  I need to specify a
>> time zone as this time >> doesn't exist in my operating system's current
>> time zone.  I still think this is odd behaviour >> though!  When you look
>> at the missing object it doesn't look missing at all.  


This is just one reason why the posting guide asks you please to provide a small, self-contained, reproducible example of the problem, along with session information, which you never provided:

?sessionInfo
sessionInfo()

On my system, for instance, your example returns TRUE:

> is.na(strptime("19810329012000",format="%Y%m%d%H%M%S"))
[1] FALSE
> sessionInfo()

R version 2.7.1 Patched (2008-06-27 r46012) i386-pc-mingw32

locale:
LC_COLLATE=English_South Africa.1252;LC_CTYPE=English_South Africa.1252;LC_MONETARY=English_South
Africa.1252;LC_NUMERIC=C;LC_TIME=English_South Africa.1252

attached base packages:

[1] grid      splines   stats     graphics  grDevices utils     datasets 
methods   base     

other attached packages:
[1] exactLoglinTest_1.3.6 vcd_1.0-8             colorspace_0.95      
MASS_7.2-42          
[5] Design_2.1-1          survival_2.34-1       Hmisc_3.4-3          

loaded via a namespace (and not attached): [1] cluster_1.11.11 lattice_0.17-10 tools_2.7.1

Regards, Mark.

Caroline Keef-2 wrote:
>
>
> is.na(strptime("19810329012000",format="%Y%m%d%H%M%S"))
> [1] TRUE
>
> The problem was to do with daylight saving time. I need to specify a time
> zone as this time doesn't exist in my operating system's current time
> zone. I still think this is odd behaviour though! When you look at the
> missing object it doesn't look missing at all.
>
> Caroline
>
> _________________________________________________________________
> Find the best and worst places on the planet
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

-- 
View this message in context: http://www.nabble.com/Strptime--date-time-classes-tp18362221p18446951.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 14 Jul 2008 - 16:05:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Jul 2008 - 16:31:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive