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 instead of the desired Julian date:
|> >
|> > > as.date("02-MA
G'day Isabella,
On Tue, 10 Nov 2009 20:11:31 -0800
"Isabella Ghement" 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. :)
If you have
[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&
quot;)
strptime(d, "%d%b%y")$year
Try this as well, just in case:
d <- as.date("02-MAY-07",order="dmy")
strptime(d, "%d%b%y")$year
How does one extract (a meaningful) year from the object d above?
Kind regards,
Isabella
Isabella R. Ghement, Ph.D.
Gheme
Isabella
Isabella R. Ghement, Ph.D.
Ghement Statistical Consulting Company
301-7031 Blundell Road, Richmond, B.C., Canada, V6Y 1J5
Tel: 604-767-1250
Fax: 604-270-3922
E-mail: isabe...@ghement.ca
Web: www.ghement.ca
-Original Message-----
From: Berwin A Turlach [mailto:ber...@maths.uwa.
G'day Isabella,
On Tue, 10 Nov 2009 18:40:11 -0800
"Isabella Ghement" 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 a Julian d
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 yea
7 matches
Mail list logo