replace_idcol: Replace ID column

Description Usage Arguments Value

View source: R/replace_idcol.R

Description

This function replaces an ID column in a dataframe with another ID, given a lookup table

Usage

1
replace_idcol(dataset, col_toreplace, lookup)

Arguments

dataset

The input data.frame that contains the id to be replaced

col_toreplace

A string that is the name of the column to be replaced

lookup

The lookup 2-column data.frame that contains the original column as the first column and the corresponding IDs as the second. Ideally generated by "create_lookup"

Value

A data.frame which is like the original except that the ID column is replaced with its corresponding entry in the lookup table


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