Initial version of R scripts