A pure R implementation of the numerical steps in lmer