The slim package fits singular linear models to longitudinal data, particularly when there may be a relationship between the number and timings of the measurements and the observations themselves.