% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{censor_discrete}
\alias{censor_discrete}
\title{Censor discrete values}
\usage{
censor_discrete(x, range)
}
\arguments{
\item{x}{A vector of values.}

\item{range}{A character vector of values that should be kept.}
}
\value{
\code{x} with values not in \code{range} as \code{NA}.
}
\description{
The out-of-bounds functions in the \link[scales:scales]{scales}
package only work with continuous ranges. This oob function
works on discrete values.
}
\examples{
censor_discrete(c("a", "b", "c"), range = c("a", "b"))

}
