Skip to content
Prev 570 / 15274 Next

rMetrics bug

# FIX:

rev.timeDate =
function (x)
{
    if (Sys.getenv("TZ")[[1]] != "GMT")
        warning("Set timezone to GMT!")
    if (!inherits(x, "timeDate"))
        stop("Wrong class type")
    # Replace:
    # x at Data = rev(x at Data)
    # with
    x at Data = x at Data[length(x at Data[[1]]):1]
    x
}

# Try:

rev(timeSequence(len=20))

[1] "Zurich"
 [1] [2004-01-20] [2004-01-19] [2004-01-18] [2004-01-17] [2004-01-16]
 [6] [2004-01-15] [2004-01-14] [2004-01-13] [2004-01-12] [2004-01-11]
[11] [2004-01-10] [2004-01-09] [2004-01-08] [2004-01-07] [2004-01-06]
[16] [2004-01-05] [2004-01-04] [2004-01-03] [2004-01-02] [2004-01-01]


Best regards DW
Parlamis Franklin wrote: