Adding support for R  and R scripts.

Support for R. Needs R installed on all the nodes and export R_HOME in yarn-env.sh