\Header{duplicated}{Determine Duplicate Elements}
\keyword{logic}{duplicated}
\keyword{manip}{duplicated}
\begin{Usage}
\begin{verbatim}
duplicated(x)
\end{verbatim}
\end{Usage}
\begin{Value}
This function determines which elements of a vector are duplicates
of elements with smaller subscripts, and returns a
logical vector indicating which elements are duplicates.\end{Value}
\begin{SeeAlso}
\texttt{\Link{unique}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- c(9:20, 1:5, 3:7, 0:8)
# extract unique elements
x[!duplicated(x)]
all(0:20  == sort(x[!duplicated(x)]))
\end{ExampleCode}
\end{Examples}

