added R file

‘tangled’ out R code blocks