R code for acma 320