Message-ID: <00E46D62-688D-11D9-9805-0011242E1C5E@plessthan.com>
Date: 2005-01-17T13:37:59Z
From: Dennis Fisher
Subject: Question about time series
I have data in the following format:
> DATE
[1] "01/13/2004"
In order to find the difference between two data points, I presently
use brute force to calculate the day of the year:
> strptime(DATE, format="%m/%d/%Y")$yday
[1] 12
Although this works, it may not be robust over different years. I
assume that R is sufficiently clever that a much simpler approach
exists, e.g., can I calculate the number of days since some fixed time?
Unfortunately, the man pages and FAQ did not lead me to an obvious
solution.
Any help appreciated.
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-415-564-2220
www.PLessThan.com