Revert "Revert "R Code""

This reverts commit 0c4f546bb09697c702359f66a4f80e60bd485f6d.