[R] as.POSIXct month problem

Erik Iverson eiverson at NMDP.ORG
Mon Oct 26 21:36:16 CET 2009


Not able to replicate: 

x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
z <- strptime(x, "%d%b%Y")
z

[1] "1960-01-01 CST" "1960-01-02 CST" "1960-03-31 CST" "1960-07-30 CDT"

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of guillaume chaumet
> Sent: Monday, October 26, 2009 3:32 PM
> To: r-help at r-project.org
> Subject: [R] as.POSIXct month problem
> 
> Hi everybody
> When I try example of strptime
> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
> z <- strptime(x, "%d%b%Y")
> 
> The result is;
> 
> > z
> [1] NA NA NA NA
> 
> I have got the same result with complete form of month but not with
> numeric
> form.
> 
> Any idea?
> 
> 	[[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.




More information about the R-help mailing list