Description Usage Arguments Examples
Find what columns a data set is unique by
1 | composite_primary_keys(data, expected_primary_keys)
|
data |
Dataframe to find primary keys of |
expected_primary_keys |
List form of columns that should identify the dataset uniquely |
1 2 3 4 5 6 7 8 9 10 | data <- data.frame(a = c(1, 2, 3, 4, 5, 6),
b = c(1, 2, 2, 3, 4, 5),
c = c('a', 'b', 'b', 'c', 'd','e'),
id = c(1111, 2222, 2222, 3333, 4444, 5555))
nrow(data)
n_distinct(data$id)
primary_keys <- composite_primary_keys(data, c("id"))
print(primary_keys)
composite_primary_keys()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.