untangle: Disentangling a complex variable

Description Usage Arguments Examples

Description

We are occassionally faced with a data set variable that contains multiple pieces of information. Multiple pieces of information are stored in this variable. In this case these pieces are delineated by a comma or colon. As is, the variable is not useful. The *untangle* function can be used to create a set of dummy codes from this variable that will be more useful. This results in a new dataset with dummy codes

Usage

1
untangle(data, x, pattern, verbose = FALSE)

Arguments

data

The name of the dataframe you

x

Column to untangle

pattern

Special characters that separate the variables in the column

verbose

TRUE or FALSE

Examples

1
untangle(data=test_data, x="charges", pattern="[,:]", verbose=TRUE)

andrewbtran/muckrakr documentation built on May 12, 2019, 3:37 a.m.