% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/to_from_all.R
\name{copy_class}
\alias{copy_class}
\title{Re-Class ts-Boxable Object}
\usage{
copy_class(
  x,
  template,
  preserve.mode = TRUE,
  preserve.names = FALSE,
  preserve.time = FALSE
)
}
\arguments{
\item{x}{ts-boxable time series, an object of class \code{ts}, \code{xts}, \code{zoo},
\code{data.frame}, \code{data.table}, \code{tbl}, \code{tbl_ts}, \code{tbl_time}, \code{tis}, \code{irts} or
\code{timeSeries}.}

\item{template}{ts-boxable time series, an object of class \code{ts}, \code{xts},
\code{zoo}, \code{data.frame}, \code{data.table}, \code{tbl}, \code{tbl_ts}, \code{tbl_time}, \code{tis},
\code{irts} or \code{timeSeries}.}

\item{preserve.mode}{should the mode the time column be preserved
(data frame only)}

\item{preserve.names}{should the name of the time column be preserved
(data frame only)}

\item{preserve.time}{should the values time column be preserved
(data frame only)}
}
\description{
Copies class attributes from an existing ts-boxable series. Mainly used
internally.
}
\details{
Inspired by \code{xts::reclass}, which does something similar.
}
