[Rd] strptime failure R 2.2.1 (PR#8773)

Gabor Grothendieck ggrothendieck at gmail.com
Sat Apr 15 19:39:09 CEST 2006


It doesn't do that for me:

> example(strptime)

strptm> format(Sys.time(), "%a %b %d %X %Y %Z")
[1] "Sat Apr 15 1:37:39 PM 2006 Eastern Daylight Time"

strptm> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")

strptm> z <- strptime(x, "%d%b%Y")

strptm> z
[1] "1960-01-01" "1960-01-02" "1960-03-31" "1960-07-30"

strptm> dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92",
    "02/01/92")

strptm> times <- c("23:03:20", "22:29:56", "01:03:30", "18:21:03",
    "16:56:26")

strptm> x <- paste(dates, times)

strptm> z <- strptime(x, "%m/%d/%y %H:%M:%S")

strptm> z
[1] "1992-02-27 23:03:20" "1992-02-27 22:29:56" "1992-01-14 01:03:30"
[4] "1992-02-28 18:21:03" "1992-02-01 16:56:26"
> R.version.string # windows XP
[1] "R version 2.2.1, 2005-12-20"
>


On 4/15/06, hutch at moneyware.com <hutch at moneyware.com> wrote:
> Full_Name: Bill Hutchison
> Version: 2.2.1
> OS: Windows XP
> Submission from: (NULL) (69.158.121.13)
>
>
> example(strptime) produces the following error:
>
> Error in strptime(x, "%d%b%Y") : 2 arguments passed to 'strptime' which requires
> 3
>
> This error occurs wherever strptime is used. It does not occur in 2.2.0
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list