the grouping vector to be used for the new columns.
varnames
the variable names if not the grouping levels should be used.
Value
the reshaped object
Details
ToLong expects x as a matrix or a data.frame and reshapes it to a factor representation.
ToWide expects two vectors, x being the variable and g being the splitfactor.