Skip to content
Prev 33529 / 63424 Next

Why is strptime always returning a vector of length 9 ?

Dear List,


I am having an issue with strptime (see below).
I can reproduce it on R-2.8, R-2.9, and R-2.10-dev, I tempted to see
either a bug or my misunderstanding (and then I just don't currently see
where).

# setup:
x <- c("March 09, 2007", "May 31, 2007", "November 12, 2008", "November
12, 2008", "July 30, 2009", "July 30, 2009" )

# showing the problem
6
9
[1] "2007-03-09" "2007-05-31" "2008-11-12" "2008-11-12" "2009-07-30"
[6] "2009-07-30" NA           NA           NA
[1] 9
[1] "2007-03-09" "2007-05-31" "2008-11-12" "2008-11-12" "2009-07-30"
 [6] "2009-07-30" "2007-03-09" "2007-05-31" "2008-11-12" "2008-11-12"
[11] "2009-07-30" "2009-07-30

Any pointer would be appreciated.



L.