% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers_table1.R
\name{canonize_levels}
\alias{canonize_levels}
\title{Canonize levels for consistent factor conversion}
\usage{
canonize_levels(x)
}
\arguments{
\item{x}{A vector (logical, numeric, integer, character, or factor).}
}
\value{
A factor with canonical levels.
}
\description{
Converts a vector to a factor with canonized levels. Logical vectors
become \code{factor("0", "1")}, numeric vectors are coerced via
\code{as.character}, and character vectors are trimmed.
}
\keyword{internal}
