From phil at google.com  Sun Jun 13 06:54:09 2004
From: phil at google.com (phil@google.com)
Date: Sun Jun 13 06:54:11 2004
Subject: [Rd] can't create a POSIXct from an actual Unix timestamp (PR#6975)
Message-ID: <20040613045409.738A01058D@slim.kubism.ku.dk>

Full_Name: Philip Gross
Version: 1.9.0
OS: Linux Redhat 9.0
Submission from: (NULL) (65.57.245.11)


Among the many conversions for POSIXct values, there does not seem to be one
which will accept an actual POSIX timestamp, e.g. as produced by MySQL's
UNIX_TIMESTAMP() function.  I have fixed this by adding the following lines to
R-1.9.0/src/library/base/R/datetime.R , at line 89:

    if(is.numeric(x))
        return(structure(x, class = c("POSIXt", "POSIXct")))

I am far from an R guru, and this was done based on pattern matching the code. 
It seems to work, though.


[Rd] can't create a POSIXct from an actual Unix timestamp (PR#6975)
phil@google.com