ancestorConceptProcessor: Create an ancestry concept processor

Description Usage Arguments Value Author(s)

Description

Use an ancestry table to add a column of ancestor concepts to a record table

Usage

1
2
3
4
5
6
ancestorConceptProcessor(concept_ancestor = "concept_ancestor",
  concept_tbl = NULL, concept_list = NULL, handle_remaining = "drop",
  con = NULL, record_table_column = "concept_id",
  ancestor_column = "ancestor_concept_id",
  descendant_column = "descendant_concept_id",
  out_column = "concept_id", copy = FALSE)

Arguments

concept_ancestor

The table defining ancestry relations

concept_tbl

A one-column table with the ancestor concepts to map (use either this or concept_list)

concept_list

An array or list with the ancestor concepts to map (use either this or concept_tbl)

handle_remaining

How to handle concepts not mapped to ancestors. "drop" (the default) removes the records, "passthrough" passes the values through (only use if ancestor and descendant concepts are of the same type).

con

The connection to use when specifying tables by their names in a database as strings

record_table_column

The column in the record table on which to map ancestors

ancestor_column

The ancestor column in 'concept_ancestor'

descendant_column

The descendant column in 'concept_ancestor'

out_column

The name to give the resulting column

copy

Passthrough parameter to [dplyr::left_join], needed when tables have different sources

Value

A function that operates on a table and adds 'out_column' accordingly

Author(s)

Yuriy Sverchkov


sverchkov/BaselineRegularization documentation built on May 9, 2019, 1:26 p.m.