Rev 12256 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{duplicated}\title{Determine Duplicate Elements}\usage{duplicated(x, incomparables = FALSE)}\alias{duplicated}\arguments{\item{x}{an atomic vector}\item{incomparables}{a vector of values that cannot be compared.Currently, \code{FALSE} is the only possible value, meaning that allvalues can be compared.}}\description{Determines which elements of a vector are duplicates of elements withsmaller subscripts, and returns a logical vector indicating whichelements are duplicates.}\seealso{\code{\link{unique}}.}\examples{x <- c(9:20, 1:5, 3:7, 0:8)## extract unique elements(xu <- x[!duplicated(x)])stopifnot(xu == unique(x), # but unique(x) is more efficient0:20 == sort(x[!duplicated(x)]))}\keyword{logic}\keyword{manip}