bind_missing_combs: Add the missing combinations of x and y

Description Usage Arguments Value Examples

View source: R/asymmetrise.R

Description

Adds rows to the input data table to include any combinations of .x and .y that are not already present. All other columns (if any) are set to NA

Usage

1

Arguments

df

input data table

.x, .y

names of the columns for which to add missing comparisons

Value

a data table with the new rows

Examples

1
2
3
4
5
6
7
df <- data.frame(a = c("A", "B"),
                 b = c("C", "A"),
                 untouched = c(1, 2),
                 stringsAsFactors = FALSE)
df

bind_missing_combs(df, a, b)

jhrcook/ggasym documentation built on April 8, 2020, 10:13 a.m.