R statistic program learning