makeBinVars: makeBinVars

Description Usage Arguments

Description

This function will create a set of n binary variables to indicate the presence or absence of a each element of a user-defined vector of n strings, where the string of interest may appear in one or more data.frame columns.

Usage

1
makeBinVars(codes, dfCols, data, key, outName = "newBinVars")

Arguments

codes

A character vector of the codes of interest.

dfCols

Either a character vector reflecting the names of data columns to look through for x, or a numeric vector of column indices.

data

A dataframe containing individual claims-level data.

key

Either a character vector or column indices to indicate the unique key necessary to allow for merging back to original dataset.

outName

Name for the list object given as output of this function. "newBinVars" will be applied as default unless another string is given.


etesdahl/claimWranglR documentation built on May 16, 2019, 8:55 a.m.