% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{anchor_to_factor}
\alias{anchor_to_factor}
\title{Anchor variable to ordered factor}
\usage{
anchor_to_factor(anchor)
}
\arguments{
\item{anchor}{A character, factor or numeric vector corresponding to
the anchor of the individuals. The following values are recognized:
\itemize{
\item character() or factor() : "0", "1", "2", "left", "right", "either"
\item numeric() : 1 = "left", 2 = "right", 0 = "either"
}}
}
\value{
An ordered factor vector containing the transformed variable
"either" < "left" < "right"
}
\description{
Anchor variable to ordered factor
}
\examples{
Pedixplorer:::anchor_to_factor(c(1, 2, 0, "left", "right", "either"))
}
\keyword{internal}
