1 Dec 19:12
Re: chron and R 2.8
From: stephen sefick <ssefick <at> gmail.com>
Subject: Re: chron and R 2.8
Newsgroups: gmane.comp.lang.r.general
Date: 2008-12-01 18:12:56 GMT
Subject: Re: chron and R 2.8
Newsgroups: gmane.comp.lang.r.general
Date: 2008-12-01 18:12:56 GMT
These are the two functions that I use to read the data in. I have
reverted back to R 2.7.2, chron 2.3-24, zoo 1.5-4, StreamMetabolism
0.03. This configuration works just fine- like I expect and with
considerable time speed up over both R 2.8 and chron 2.3-24 and
2.3-25.
fmt.chron <- function (x)
{
chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x))
}
read.production <- function (data)
{
read.zoo(data, sep = ",", FUN = fmt.chron, header = TRUE)
}
DateTime RM215Temp
800 1/9/06 7:46 11.12
801 1/9/06 8:01 11.11
802 1/9/06 8:16 10.98
803 1/9/06 8:31 10.90
804 1/9/06 8:46 10.94
805 1/9/06 9:01 10.98
806 1/9/06 9:16 10.98
807 1/9/06 9:31 11.00
808 1/9/06 9:46 11.02
809 1/9/06 10:01 11.04
810 1/9/06 10:16 11.06
811 1/9/06 10:31 11.07
812 1/9/06 10:46 11.09
(Continue reading)
RSS Feed