buildtrack function

Build trackdata objects from the output of by()