Closed joshuaulrich closed 1 month ago
This test fails in R-devel r86639:
x <- .xts(integer(), integer(), tclass = "Date", tzone = "UTC") merge(x, x, x) ## Error in merge.xts(x, x, x) : can't change type from REALSXP to INTSXP ## Calls: merge -> merge.xts
Because of the call to SET_TYPEOF() here: https://github.com/joshuaulrich/xts/blob/54298450933fe1d63f221d38afe5aa765849a34b/src/merge.c#L375
SET_TYPEOF()
That code block calls xts(), which returns an empty xts object with 'double' coredata. SET_TYPEOF() tries to convert it to the same type as x (integer) and that fails.
xts()
x
Thanks to Kurt Hornik for the report.
Description
This test fails in R-devel r86639:
Because of the call to
SET_TYPEOF()
here: https://github.com/joshuaulrich/xts/blob/54298450933fe1d63f221d38afe5aa765849a34b/src/merge.c#L375That code block calls
xts()
, which returns an empty xts object with 'double' coredata.SET_TYPEOF()
tries to convert it to the same type asx
(integer) and that fails.Thanks to Kurt Hornik for the report.