% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmDynR.R
\name{Modes}
\alias{Modes}
\title{Retrieve mode of vector}
\usage{
Modes(x)
}
\arguments{
\item{x}{vector from which to retrieve the mode from.}
}
\value{
same class as 'x'.
}
\description{
This function returns the mode of a vector. If the vector contains a character or factor, the most common character/factor is returned. Numbers written as characters will be compatible with non-character numbers (i.e. doubles/numeric), but the function returns a character.
}
\examples{
Modes(x = c(1, 1, 3, 0, 2, 4, 2, 1, 5, 2, 1))
Modes(x = c('a','b', 'c', 'a', 'c', 'a'))
Modes(x = c('a', 2, 'x', 7895, 1, '2', 't', 2, 1))
}
\seealso{
tabulate()
}