1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/anon.R
3\name{fct_anon}
4\alias{fct_anon}
5\title{Anonymise factor levels}
6\usage{
7fct_anon(f, prefix = "")
8}
9\arguments{
10\item{f}{A factor.}
11
12\item{prefix}{A character prefix to insert in front of the random labels.}
13}
14\description{
15Replaces factor levels with arbitrary numeric identifiers. Neither
16the values nor the order of the levels are preserved.
17}
18\examples{
19gss_cat$relig \%>\% fct_count()
20gss_cat$relig \%>\% fct_anon() \%>\% fct_count()
21gss_cat$relig \%>\% fct_anon("X") \%>\% fct_count()
22}
23