Cross validation for linear mixed effect model

Hi all,

I try to compare predictive performance between linear regression and linear mixed model based on the MAE value calculated from cross validation. That is an trivial task for linear regression but I do not know how to perform that test on lmm in R.
How I can split the data into training and test groups? How I can evaluate how well a model with coefficients calculated using the training data fits the validation data?

Any suggestions?

Thank you!