Description Usage Arguments Details Value Examples
View source: R/getRepeatedRowsByKeys.R
Returns a data.table of the repeated rows for a given key.
1 | getRepeatedRowsByKeys(dt_data, v_s_keys = NULL)
|
dt_data |
a data.table. |
v_s_keys |
a character vector of column names in |
all rows of dt_data
for which the combination of values of v_s_keys
are repeated is returned. Additionally
a new column rep_count_
is added which indicates the number of times the key combination is repeated in the data set.
If there is no repeated cases function returns NULL
.
a data.table of all the rows which the combination of the values of v_s_keys
are repeated. See details
.
1 2 3 4 | library(data.table)
dt_data <- data.table( unique_identifier = c(1,2,3,3,3,4,4,5), value = rnorm(8))
getRepeatedRowsByKeys(dt_data, "unique_identifier")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.