Added first version of R working script