powered by
Erases consecutive duplicated values from the container by reference.
unique(x, incomparables, ...)
Returns the number of deleted elements.
A CppForwardList or CppList object.
Ignored.
Duplicated, non-consecutive elements are not removed.
incomparables and ... are only included for compatibility with the generic base::unique method and have no effect.
incomparables
...
base::unique
erase, remove., sort.
l <- cpp_forward_list(c(4, 5, 6, 6, 4)) l # 4 5 6 6 4 unique(l) # [1] 1 l # 4 5 6 4
Run the code above in your browser using DataLab