This finds the unique values in the original order.
Unique(x)
x
unique values of the series.
A. I. McLeod and M. S. Islam
a<-c(4,3,2,4,5,1,2,4,2,1,4,5,3) Unique(a)