| find_duplicate_factors | R Documentation |
Identify factor-table rows that have duplicate lookup keys.
find_duplicate_factors(factor_table, max_vars = 12, ...)
factor_table |
A normalized long-form factor table. |
max_vars |
Maximum number of variable-level slot pairs to inspect. |
... |
Additional arguments accepted for backward compatibility. |
A data frame containing factor-table rows with duplicated lookup keys. An empty data frame is returned when no duplicates are found.
factor_table <- data.frame(
state = c("IL", "IL", "IL"),
coverage = c("BI", "BI", "BI"),
term_name = c("territory", "territory", "territory"),
term_value = c(1.10, 1.15, 0.95),
variable1 = c("territory", "territory", "territory"),
level1 = c("A", "A", "B"),
stringsAsFactors = FALSE
)
duplicates <- find_duplicate_factors(
factor_table,
max_vars = 1
)
duplicates[
,
c(
"state",
"coverage",
"term_name",
"term_value",
"variable1",
"level1"
)
]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.