From the docs
try.xts and reclass are functions that enable external developers access to the reclassing tools within xts to help speed development of time-aware functions, as well as provide a more robust and seemless end-user experience, regardless of the end-user's choice of data-classes.
if you use try.xts
to convert a xtsible
object to xts
object , reclass
or Reclass
both should be able to convert it back to it's original class with all attributes intact.
class(Reclass(try.xts(sample_matrix)))
## [1] "matrix"
class(reclass(try.xts(sample_matrix)))
## [1] "matrix"