*! version 1.0 10jul2017

Title

unite -- Paste together multiple variables into one

Syntax

unite varlist , gen(newvar) [sep(string)]

Description

unite pastes together a list of variables varlist into one. Its goal is similar to the homonym function in the R package tidyr.

Options

sep(newvar) Name of the new variable

sep(string) Separator between variables. Default to _

Examples

. set obs 100

. gen var1 = "a"

. gen var2 = "b"

. unite var1 var2, gen(var3)

Author

Matthieu Gomez

Department of Economics, Princeton University

Please report issues on Github
https://github.com/matthieugomez/stata-tidy