% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{binarize_dataset}
\alias{binarize_dataset}
\title{binarize_dataset}
\usage{
binarize_dataset(model, columns, keep = FALSE, all_levels = FALSE)
}
\arguments{
\item{model}{(Model) Pharmpy model}

\item{columns}{(array(str) (optional)) The columns to binarize or NULL for all marked as categorical}

\item{keep}{(logical) Keep the original column in dataset (default is FALSE)}

\item{all_levels}{(logical) Create one column per level, otherwise skip last value (default is FALSE)}
}
\value{
(Model) Updated Pharmpy model
}
\description{
Binarize dataset

Will create one column per category if specified, otherwise for all columns
except for the last one. Will also update datainfo so that new columns have
type covariate and is categorical.
}
\examples{
\dontrun{
model <- load_example_model("pheno")
model <- binarize_dataset(model, c('APGR'))
model$dataset
}

}
