写一个函数,计算数据集中每五个观测值的平均值和范围?
如果在数量上的最后一组值的数目小于5,它需要给出的注释它。
例如:
For example if the data are 3,4,5,6,7,2,3,4,5,6,6,1 The function should return: The average and range of (3,4,5,6,7) and average and range of (2,3,4,5,6) and average and range for (6,1) and a message that in the last group you have only 2 values.
求各位高手指点迷经。
谢谢
|