有一组数据 新建一组变量flag 输出为
id score id score flag
1 1.5 1 1.5
1 1.6 1 1.6
1 1.9 1 1.9 yes
2 1.3 2 1.3
2 1.4 2 1.4
2 1.4 2 1.4 yes
就是flag是按照id分组 当score为组内最大值时flag为yes 否则为空格,一组id里score有重复值时,在升序排列的最后一位记录yes。想在data步里编程应该怎么写?求帮助,谢谢!