% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/recode.R
\encoding{UTF-8}
\name{recode}
\alias{recode}
\title{Recode}
\usage{
recode(x, oldcode = sort(unique(x)), newcode)
}
\arguments{
\item{x}{A vector.}

\item{oldcode}{A vector of old codes.}

\item{newcode}{A vector of new codes.}
}
\value{
A recoded vector.
}
\description{
Recodes values in a vector.
}
\examples{
x <- rep(1:3, times = 1:3)
newx <- recode(x, oldcode = 1:3, newcode = c("a", "b", "c"))

}
\author{
\enc{Aleš Žiberna}{Ales Ziberna}
}
\keyword{manip}
