MINI MINI MANI MO
%
% Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.recode}
\alias{ore.recode}
\alias{ore.recode,ANY-method}
\alias{ore.recode,ore.vector-method}
\title{Oracle R Enterprise ore.vector Value Recode Function}
\description{
Recodes the values in an \code{\linkS4class{ore.vector}} object.
}
\usage{
ore.recode(x, old, new, default = NULL)
}
\arguments{
\item{x}{
An \code{\linkS4class{ore.vector}} object.
}
\item{old}{
An \R vector specifying the old values in \code{x}.
}
\item{new}{
Either an \R vector of the same length as argument \code{old} or an
\R matrix with the same number of rows as argument \code{old}
specifying the new values.
}
\item{default}{
A single value to use for the non-matched elements in argument
\code{old}. If \code{NULL}, non-matched elements are converted to
\code{NA} values.
}
}
\value{
If argument \code{new} is an \R vector, returns an
\code{\linkS4class{ore.vector}} object representing a recoded vector.
If argument \code{new} is a \R matrix, returns an
\code{\linkS4class{ore.frame}} object where each column of argument
\code{new} generates a corresponding recoded column in the return value.
}
\references{
\href{http://www.oracle.com/technetwork/database/database-technologies/r/r-enterprise/documentation/index.html}{Oracle R Enterprise}
}
\author{
Oracle \email{oracle-r-enterprise@oracle.com}
}
\seealso{
\code{\linkS4class{ore.vector}}, \code{\link{ore.hash}}
}
\examples{
vec <- ore.push(c("a", "b", NA, "a", "c", NA, "e"))
ore.recode(vec, c("a", "b", "c"), c("able", "baker", "charlie"))
ore.recode(vec, c("a", "b", "c"),
cbind(lower = c("able", "baker", "charlie"),
UPPER = c("ABLE", "BAKER", "CHARLIE")))
}
\keyword{utilities}
\keyword{database}
\keyword{ORE}
OHA YOOOO