Function to expand a data table so that the cells that are vectors are transposed and the rest repeated to fill the gaps

expandDT(DT, toExpand = NULL)

Arguments

DT

A data.table.

toExpand

A vector of names of the tables to expand.