From ggrothendieck at gmail.com  Sat Apr 15 19:39:09 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sat, 15 Apr 2006 13:39:09 -0400
Subject: [Rd] strptime failure R 2.2.1 (PR#8773)
In-Reply-To: <20060415173213.142D0BFFC@slim.kubism.ku.dk>
References: <20060415173213.142D0BFFC@slim.kubism.ku.dk>
Message-ID: <971536df0604151039s65649152l9bdf6a47477d9d42@mail.gmail.com>

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
>



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