% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{deidentify_data}
\alias{deidentify_data}
\title{deidentify_data}
\usage{
deidentify_data(df, id_column = "ID", date_columns = NULL)
}
\arguments{
\item{df}{(data.frame) A dataset}

\item{id_column}{(str) Name of the id column}

\item{date_columns}{(array(str) (optional)) Names of all date columns}
}
\value{
(data.frame) Deidentified dataset
}
\description{
Deidentify a dataset

Two operations are performed on the dataset:
\enumerate{
\item All ID numbers are randomized from the range 1 to n
\item All columns containing dates will have the year changed
}

The year change is done by letting the earliest year in the dataset
be used as a reference and by maintaining leap years. The reference year
will either be 1901, 1902, 1903 or 1904 depending on its distance to the closest
preceeding leap year.
}
