expand function

An expand.grid-like function that repeats sets of vectors for every value in a reference vector.