added r script; gave credit where credit is due.