File: Class-xts.R

package info (click to toggle)
r-cran-spacetime 1.3-3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,240 kB
  • sloc: sh: 13; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
setOldClass("xts")
setOldClass("zoo")
tzone = function(x, ...) {
  if (utils::packageVersion("xts") <= "0.11.2") {
    if (inherits(x, "xts")) {
      tzoneAttr = attr(xts::.index(x), "tzone")
    } else {
      tzoneAttr = attr(x, "tzone")
    }
  } else {
    tzoneAttr = xts::tzone(x, ...)
  }
  tzoneAttr
}