Add majority_aggregate R script