your solution works pretty well, if there is one "non atomic" entry ("values" in this case). If there was another one I didn't manage to "loop" your idea.
I hope this isn't to complicated but this script is the simplest I could do. The problem is, that i have a list, containing other lists, containing other lists, containg other lists, containing vectors.
the integers are just a quick way to select the columns to operate on, save me typing their names. but names are probably better for robust code over time. but if its a one off, id say numbers is fine.