add_anti_join: Add an anti-join onto a tplyr_meta object

add_anti_joinR Documentation

Add an anti-join onto a tplyr_meta object


An anti-join allows a tplyr_meta object to refer to data that should be extracted from a separate dataset, like the population data of a Tplyr table, that is unavailable in the target dataset. The primary use case for this is the presentation of missing subjects, which in a Tplyr table is presented using the function add_missing_subjects_row(). The missing subjects themselves are not present in the target data, and are thus only available in the population data. The add_anti_join() function allows you to provide the meta information relevant to the population data, and then specify the on variable that should be used to join with the target dataset and find the values present in the population data that are missing from the target data.


add_anti_join(meta, join_meta, on)



A tplyr_meta object referring to the target data


A tplyr_meta object referring to the population data


A list of quosures containing symbols - most likely set to USUBJID.


A tplyr_meta object


tm <- tplyr_meta(
  rlang::quos(TRT01A, SEX, ETHNIC, RACE),
  rlang::quos(TRT01A == "Placebo", TRT01A == "SEX", ETHNIC == "HISPANIC OR LATINO")

tm %>%
      rlang::quos(TRT01A, ETHNIC),
      rlang::quos(TRT01A == "Placebo", ETHNIC == "HISPANIC OR LATINO")
    on = rlang::quos(USUBJID)

Tplyr documentation built on May 29, 2024, 10:37 a.m.