worked on r code, got it to a stage that i am pretty happy with (looks like it is outputting the right thing - but need to double check
output file from lengthComp_cumu.r