: Venables, Bill (CMIS, Cleveland); quagmire54...@yahoo.com;
r-help@r-project.org
Subject: RE: [R] Convert Character to Date
Just to correct/expand/clarify the parenthetical below (how often is there a
chance to correct or clarify something posted by Bill Venables?), the ides are
the 15th of March
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of bill.venab...@csiro.au
> Sent: Tuesday, March 31, 2009 1:29 AM
> To: quagmire54...@yahoo.com; r-help@r-project.org
> Subject: Re: [R] Convert Charact
The yearmon class in the zoo package can represent year/months:
> library(zoo)
> ym <- as.yearmon("1990-January", "%Y-%B"); ym
[1] "Jan 1990"
> as.Date(ym)
[1] "1990-01-01"
On Tue, Mar 31, 2009 at 3:14 AM, Bob Roberts wrote:
> Hello,
> I have a date in the format Year-Month Name (e.g. 1990-Ja
s.csiro.au/bill.venables/
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Bob Roberts
Sent: Tuesday, 31 March 2009 5:14 PM
To: r-help@r-project.org
Subject: [R] Convert Character to Date
Hello,
I have a date in the format Y
Hello,
I have a date in the format Year-Month Name (e.g. 1990-January) and R
classes it as a character. I want to convert this character into a date format,
but when I try as.Date(1990-January, "%Y-%B"), I get back NA. The function
strptime also gives me NA back. Thanks.
[[a
5 matches
Mail list logo