stephen sefick | 1 Dec 19:12
Picon

Re: chron and R 2.8

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)

Gabor Grothendieck | 1 Dec 19:32
Picon

Re: chron and R 2.8

Please provide the input file so its reproducible.

On Mon, Dec 1, 2008 at 1:12 PM, stephen sefick <ssefick <at> gmail.com> wrote:
> 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
(Continue reading)

Gabor Grothendieck | 1 Dec 23:50
Picon

Re: chron and R 2.8

I've had an offline conversion with Stephen about this and it seems
that in R 2.8.0 order is much slower when applied to chron objects
than previously.

The fix for zoo users is to enter this line (which is already in the development
version of zoo) before using any chron objects from zoo in your session:

ORDER.chron <- ORDER.dates <- ORDER.times <- function(x, ...)
order(as.numeric(x), ...)

On Mon, Dec 1, 2008 at 1:12 PM, stephen sefick <ssefick <at> gmail.com> wrote:
> 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
(Continue reading)


Gmane