Copies class attributes from an existing ts-boxable series. Mainly used internally.
copy_class(
x,
template,
preserve.mode = TRUE,
preserve.names = FALSE,
preserve.time = FALSE
)
ts-boxable time series, an object of class ts
, xts
, zoo
,
data.frame
, data.table
, tbl
, tbl_ts
, tbl_time
, tis
, irts
or
timeSeries
.
ts-boxable time series, an object of class ts
, xts
,
zoo
, data.frame
, data.table
, tbl
, tbl_ts
, tbl_time
, tis
,
irts
or timeSeries
.
should the mode the time column be preserved (data frame only)
should the name of the time column be preserved (data frame only)
should the values time column be preserved (data frame only)
Inspired by xts::reclass
, which does something similar.