create_lookup: Create ID Lookup Table

Description Usage Arguments Value

View source: R/create_lookup.R

Description

This function creates a lookup dataframe where one column is the original key of an input dataframe and the other is the replacement ID

Usage

1
create_lookup(dataset, keycol_name, digits = 7, seed = 123)

Arguments

dataset

The input data.frame that contains a column which is the key (unique identifier)

keycol_name

A string that is the name of the column that the unique id is located in

digits

An integer number of digits of the replacement id. The default is 7 to allow for enough entries. Note that increasing the argument too much will result in a large amount of memory used to internally store the range of all possible values.

seed

The random seed used to generate the dataset. This can be used to reconstruct the id mapping at a later stage.

Value

A data.frame that contains 2 columns named original.ID and replacement.ID


michaelgao8/dukeehR documentation built on May 4, 2019, 4:23 p.m.