R version of the LINGRA model