I am very (very) new to R, but I am trying to write a function for some longitudinal data. Basically, I have a dataset in which participants would do a survey every week for