long_to_seq function

Transform a data frame from long format to a sequence obect