Closed
Description
Description
I've come across a few cases in xts 0.12 where tclass gets changed:
> test <- .xts(1:5, 1:5, tclass="timeDate")
> tclass(test > 2)
[1] "POSIXct" "POSIXt"
and
> test <- .xts(1:5, 1:5, tclass="timeDate")
> tclass(reclass(1:5, test))
[1] "POSIXct" "POSIXt"
>
This is a regression of #249 in 0.12
I think there are a few places where .indexClass
was passed into the .xts
constructor before and tclass
needs adding in its place.
Expected behavior
tclass
should not be adjusted
Session Info
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.7.0
LAPACK: /usr/lib/lapack/liblapack.so.3.7.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xts_0.12-0 zoo_1.8-7
loaded via a namespace (and not attached):
[1] compiler_3.6.2 grid_3.6.2 lattice_0.20-38