DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
The function duplicated identifies elements of a data
structure that are duplicated:
> x <- c(1, 1, 1, 2, 2, 2, 3, 3, 3, 3) > duplicated(x) [1] FALSE TRUE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE > x <- x[!duplicated(x)] > x [1] 1 2 3 > |