| data_diff_groups | R Documentation |
data_diff_groups() is a wrapper around diff_groups() that runs the same analysis
on two variables in a data frame and adds selected results back as new columns.
data_diff_groups(
data,
input_vars,
output_vars = c(is_common = "is_common", diff_1_2 = "diff_1_2", diff_2_1 = "diff_2_1",
sum_1_2 = "sum_1_2", sum_2_1 = "sum_2_1"),
...
)
data |
A data frame containing the variables to be compared. |
input_vars |
Character vector of length two specifying the names of the two
variables in |
output_vars |
Named character vector defining which variables from the group
results are added to |
... |
Additional arguments passed to |
A data frame identical to data, but with additional variables describing
relationships between the two specified columns.
df <- cbind(v1 = 1, SSBtoolsData("code_pairs"), v4 = 4)
data_diff_groups(df, input_vars = c("code_1", "code_2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.