% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/freq.R
\name{freq}
\alias{freq}
\title{The frequency of words}
\usage{
freq(x, ..., sort = FALSE)
}
\arguments{
\item{x}{A character vector of words.}

\item{...}{Must be empty. This enforces that optional arguments such as
\code{sort} are supplied with explicit names.}

\item{sort}{Whether to sort the result by descending frequency. The default
\code{FALSE} keeps the first-appearance order.}
}
\value{
A data frame with \code{char} and \code{freq} columns.
}
\description{
This function returns the frequency of words.
}
\examples{
freq(c("b", "a", "b", "c", "a"))
freq(c("b", "a", "b", "c", "a"), sort = TRUE)
}
