% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{castToTemplate}
\alias{castToTemplate}
\title{Cast \code{tbl} or \code{data.frame} x to the types of the template}
\usage{
castToTemplate(x, template)
}
\arguments{
\item{x}{\code{data.frame}, \code{tbl} or \code{data.table}}

\item{template}{\code{data.frame}, \code{tbl} or \code{data.table}}
}
\value{
object containing data of x in the class and structure of the template.
}
\description{
Cast \code{tbl} or \code{data.frame} x to the types of the template
}
\details{
If template is a \code{tbl} with database source, convert to an in-memory tibble with same data types instead.

Rownames might differ or get lost.
}
\author{
Jasper Schelfhout
}
\keyword{internal}
