Added R files - final commit 6/12