Description Usage Arguments Details Value Author(s) References Examples
Filters a vector according to the number of duplicates in the vector, where the conditions for the acceptable number of duplicate values are specified.
1 | dupe_thresh(invec, count)
|
invec |
The input vector. |
count |
The threshold for duplicates. See "Details". |
The "count"
parameter can be either a single digit or a character
vector showing the desired comparison to be used as the threshold (for
example "> 5"
). If no binary relational operator is specified, the
relational operator used is >=
.
A vector.
Ananda Mahto
http://stackoverflow.com/q/29973061/1270695
1 2 3 4 5 6 7 8 | set.seed(1)
x <- sample(letters[1:10], 35, TRUE)
sort(table(x))
table(dupe_thresh(x, 3))
table(dupe_thresh(x, "<3"))
table(dupe_thresh(x, "== 3"))
table(dupe_thresh(x, "!=3"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.