Hi everyone,
I am trying to use the function as.date() from the dates package in R
2.10.0 to convert a character date to a Julian date, as follows:
as.date(02-MAY-01, order=mdy) # convert May 2, 2001 to a Julian date
[1] 2May1
However, when trying to convert a character date from the year 2000
G'day Isabella,
On Tue, 10 Nov 2009 18:40:11 -0800
Isabella Ghement isabe...@ghement.ca wrote:
I am trying to use the function as.date() from the dates package
As far as I can tell, there is no package called dates, did you mean
the package date?
in R 2.10.0 to convert a character date to
...@ghement.ca
Web: www.ghement.ca
-Original Message-
From: Berwin A Turlach [mailto:ber...@maths.uwa.edu.au]
Sent: November 10, 2009 7:13 PM
To: Isabella Ghement
Cc: r-help@r-project.org
Subject: Re: [R] Unexpected behaviour for as.date()
G'day Isabella,
On Tue, 10 Nov 2009 18:40:11
the object d above?
Kind regards,
Isabella
Isabella R. Ghement, Ph.D.
Ghement Statistical Consulting Company
-Original Message-
From: Berwin A Turlach [mailto:ber...@maths.uwa.edu.au]
Sent: November 10, 2009 7:13 PM
To: Isabella Ghement
Cc: r-help@r-project.org
Subject: Re: [R] Unexpected
[mailto:dwinsem...@comcast.net]
Sent: November 10, 2009 8:58 PM
To: Isabella Ghement
Cc: Berwin A Turlach; r-help@r-project.org
Subject: Re: [R] Unexpected behaviour for as.date()
On Nov 10, 2009, at 11:11 PM, Isabella Ghement wrote:
Hi Berwin,
Many thanks for your fast reply! It's evening time
G'day Isabella,
On Tue, 10 Nov 2009 20:11:31 -0800
Isabella Ghement isabe...@ghement.ca wrote:
I tried the solution you suggested and find that am having problems
getting R to extract the year from an object created by as.date():
Perhaps it would be best to first clarify what you really need.
G'day fellow Pacific rim dwellers,
On Wed, 11-Nov-2009 at 11:13AM +0800, Berwin A Turlach wrote:
| G'day Isabella,
|
[...]
| However, when trying to convert a character date from the year 2000
| to a Julian date, I get an NA instead of the desired Julian date:
|
| as.date(02-MAY-00,
7 matches
Mail list logo