View source: R/not.duplicated.R
not.duplicated | R Documentation |
Opoosite of duplicated(). Checks which elements of a vector or data frame are NOT duplicates of elements with smaller subscripts
not.duplicated(x, incomparables = FALSE, ...)
x |
a vector or a data frame or an array or NULL. |
incomparables |
a vector of values that cannot be compared. FALSE is a special value, meaning that all values can be compared, and may be the only value accepted for methods other than the default. It will be coerced internally to the same type as x |
... |
arguments for particular methods. |
elements of a vector or data frame that are NOT duplicates
set.seed(08082023)
dtf <- sample(1:10,15, replace = TRUE)
dtf # 3 9 10 3 8 9 6 10 5 1 2 2 2 9 8
dtf[ dtf > 4 & duplicated(dtf) ] # 9 10 9 8
dtf[ dtf > 4 & not.duplicated(dtf) ] # 9 10 8 6 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.