% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Mode.R
\name{weighted.mode}
\alias{weighted.mode}
\title{Mode}
\usage{
weighted.mode(x, w = rep(1, length(x)))
}
\arguments{
\item{x}{(numeric vector) vector from which we'll obtain the mode}

\item{w}{(numeric vector) vector of weights. If not provided, it defaults to non-weighted mode.}
}
\value{
(numeric vector) one or multiple elements that will be the arithmetic mode
}
\description{
Calculate the arithmetic mode of a vector. If multiple elements
have the same frequency, all of them will be displayed.
}
\examples{
weighted.mode(c(1,2,3,4,5,4,3,4,5,3))
weighted.mode(c(NA,1,3,NA))
}
