\Header{weighted.mean}{Weighted Arithmetic Mean}
\keyword{univar}{weighted.mean}
\begin{Usage}
\begin{verbatim}
weighted.mean(x, w, na.rm=FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a numeric vector containing the values
whose mean is to be computed.
\item[\texttt{w}] a vector of weights the same length as \texttt{x} giving
the weights to use for each element of \texttt{x}.
\item[\texttt{na.rm}] a logical value indicating whether \texttt{NA}
values in \texttt{x} should be stripped before the computation proceeds.
\end{ldescription}
\end{Arguments}
\begin{Description}
If \texttt{w} is missing then all elements of \texttt{x} are
given the same weight.

Missing values in \texttt{w} are not handled.\end{Description}
\begin{SeeAlso}
\texttt{\Link{mean}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## GPA from Siegel 1994
wt<- c(5/15,5/15,4/15,1/15)
x <- c(3.7,3.3,3.5,2.8)
xm <- weighted.mean(x,wt)
\end{ExampleCode}
\end{Examples}

