% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anon.R
\name{fct_anon}
\alias{fct_anon}
\title{Anonymise factor levels}
\usage{
fct_anon(f, prefix = "")
}
\arguments{
\item{f}{A factor.}

\item{prefix}{A character prefix to insert in front of the random labels.}
}
\description{
Replaces factor levels with arbitrary numeric identifiers. Neither
the values nor the order of the levels are preserved.
}
\examples{
gss_cat$relig \%>\% fct_count()
gss_cat$relig \%>\% fct_anon() \%>\% fct_count()
gss_cat$relig \%>\% fct_anon("X") \%>\% fct_count()
}
