Gabor Grothendieck wrote:
In looking at this again here is a slight simplification. Its now
only one line:
library(chron)
x - c(01/00/05, 01/22/06)
as.chron(sub(/00/, /15/, x)) + (regexpr(/00/, x) 0) / 2
[1] (01/15/05 12:00:00) (01/22/06 00:00:00)
You don't really need chron
On Mon, Feb 25, 2008 at 6:03 AM, Peter Dalgaard
[EMAIL PROTECTED] wrote:
Gabor Grothendieck wrote:
In looking at this again here is a slight simplification. Its now
only one line:
library(chron)
x - c(01/00/05, 01/22/06)
as.chron(sub(/00/, /15/, x)) + (regexpr(/00/, x) 0) / 2
On Mon, Feb 25, 2008 at 7:40 AM, Peter Dalgaard
[EMAIL PROTECTED] wrote:
Gabor Grothendieck wrote:
On Mon, Feb 25, 2008 at 6:03 AM, Peter Dalgaard
[EMAIL PROTECTED] wrote:
Gabor Grothendieck wrote:
In looking at this again here is a slight simplification. Its now
only one line:
I have a data frame which contains some valuable date information. But for a
few of the dates, the day information missing .
Viz:
interesting.data$date
[1] 1/22/93 1/22/93 1/23/93 1/00/93 1/28/93 1/31/93 1/12/93
i.e. for dates where the day info is missing, the %d part of the %m/%d/%yy
It really depends on what you want to do with them but one possibility
might be to represent them as chron dates and use a time of 0 for true dates
and noon for missing dates replacing the missing day with 01 or 15 or some
other day:
library(chron)
x - c(01/00/05, 01/22/06)
no.day -
In looking at this again here is a slight simplification. Its now
only one line:
library(chron)
x - c(01/00/05, 01/22/06)
as.chron(sub(/00/, /15/, x)) + (regexpr(/00/, x) 0) / 2
[1] (01/15/05 12:00:00) (01/22/06 00:00:00)
On Sun, Feb 24, 2008 at 9:45 PM, Gabor Grothendieck
[EMAIL
6 matches
Mail list logo