first checkin for analysis R script