to really walk a novice through the process of transitioning from lme style syntax to stan/JAGS/WinBUGS?
There’s a couple functions in the brms package (CRAN - Package brms) make_stancode
and make_standata
that turn formula-like models into Stan models + the input data.
I’ve not done this myself (other than checking to make sure the functions do print out human-readable stuff), but if you want to look under the hood this might be the easiest way. And the package is @bgoodri approved (Brms paper published), so I don’t think I’m leading you too far astray.