Hello, strptime is still not working correctly in my computer (Windows 98 and R Version 1.3.1) From x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") strptime(x, "%d%b%Y") I obtain [1] "NA" "NA" "NA" "NA" while x <- c("01011960", "02011960", "3131960", "3071960") strptime(x, "%d%m%Y") gives [1] "1960-01-01" "1960-01-02" "1960-03-31" "1960-07-30" So it seems that the problem is with %b. Arto Luoma -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 1 Oct 2001, Arto Luoma wrote:> Hello, > > strptime is still not working correctly in my computer > (Windows 98 and R Version 1.3.1)This is working as documented, i.e. correctly.> From > > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") > strptime(x, "%d%b%Y") > > I obtain > > [1] "NA" "NA" "NA" "NA" > > while > x <- c("01011960", "02011960", "3131960", "3071960") > strptime(x, "%d%m%Y") > > gives > [1] "1960-01-01" "1960-01-02" "1960-03-31" "1960-07-30" > > So it seems that the problem is with %b.Do read all the example, which contains an explanation and workaround (which does not work on all systems and hence is in the comments). In your locale `jan' is not the abbreviation for January, I believe. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
al18853@uta.fi writes:> Hello, > > strptime is still not working correctly in my computer > (Windows 98 and R Version 1.3.1) > > From > > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") > strptime(x, "%d%b%Y") > > I obtain > > [1] "NA" "NA" "NA" "NA" > > while > x <- c("01011960", "02011960", "3131960", "3071960") > strptime(x, "%d%m%Y") > > gives > [1] "1960-01-01" "1960-01-02" "1960-03-31" "1960-07-30" > > So it seems that the problem is with %b.This works fine for me on a similar setup. Does Finnish localisation do strange things with month names?? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._