% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_restoretype.R
\name{data_restoretype}
\alias{data_restoretype}
\title{Restore the type of columns according to a reference data frame}
\usage{
data_restoretype(data, reference = NULL, ...)
}
\arguments{
\item{data}{A data frame to pivot.}

\item{reference}{A reference data frame from which to find the correct
column types.}

\item{...}{Additional arguments passed on to methods.}
}
\value{
A dataframe with columns whose types have been restored based on the
reference dataframe.
}
\description{
Restore the type of columns according to a reference data frame
}
\examples{
data <- data.frame(
  Sepal.Length = c("1", "3", "2"),
  Species = c("setosa", "versicolor", "setosa"),
  New = c("1", "3", "4")
)

fixed <- data_restoretype(data, reference = iris)
summary(fixed)
}
