Formulating State Space Models in R with Focus on Longitudinal Regression Models