Please assist in how do I remove every tenth observation from a data set to use as a test sample and the remaining data as a training sample building a linear regression then a linear regression using AIC:

I know how to set up the linear model but how do I remove observations in an equation?