Reshapes data with multiple measurements in a wide format into a long format with one column per measurement type.

ReshapeLong(indt, stubs, sep = NULL)

Arguments

indt

The input data.table.

stubs

Character vector containing the uniquely identifying stub portion of the variable names.

sep

Not presently used.

Value

A data.table.

References

http://stackoverflow.com/q/10468969/1270695

Author

Ananda Mahto

Examples

if (FALSE) { library(foreign) dadmom <- read.dta("http://www.ats.ucla.edu/stat/stata/modules/dadmomw.dta") ReshapeLong(dadmom, c("name", "inc")) }