Added R and grouping script