% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/encode_unit.R
\name{encode_unit}
\alias{encode_unit}
\alias{encode_unit.quant_param}
\alias{encode_unit.qual_param}
\title{Class for converting parameter values back and forth to the unit range}
\usage{
encode_unit(x, value, direction, ...)

\method{encode_unit}{quant_param}(x, value, direction, original = TRUE, ...)

\method{encode_unit}{qual_param}(x, value, direction, ...)
}
\arguments{
\item{x}{A \code{param} object.}

\item{value}{The original values should be either numeric or character. When
converting back, these should be on \code{[0, 1]}.}

\item{direction}{Either "forward" (to \code{[0, 1]}) or "backward".}

\item{original}{A logical; should the values be transformed into their
natural units.}
}
\value{
A vector of values.
}
\description{
Class for converting parameter values back and forth to the unit range
}
\details{
For integer parameters, the encoding can be lossy.
}
\keyword{internal}
