% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_demographic_table.R
\name{make_demographic_table}
\alias{make_demographic_table}
\title{Create a demographics summary table}
\usage{
make_demographic_table(data, vars, continuous_vars = NULL)
}
\arguments{
\item{data}{A data frame}

\item{vars}{demographic variables to include in the table}

\item{continuous_vars}{Optional subset of vars to be treated as continuous}
}
\value{
A gtsummary table
}
\description{
Create a demographics summary table
}
\examples{
df <- data.frame(
  age = c("25", "30 years", "35", " 40 ", "22.5", "28+", NA, ""),
  sex = c("M", "F", "m", "f", " M ", "F", "m", NA),
  education = c("HS", "BA", "MA", "ma", "Hs", "Ma", "Ba Bed", "Msc bed ")
)

# Generate a demographic summary table (assign to object to avoid printing)
demo_table <- make_demographic_table(df, vars = c("age", "sex", "education"))
demo_table # optionally inspect the table

}
