有两组数据,前面一组值设为x后面一组设为y。x是坐标的变化范围,y是每个坐标下力的大小,怎样在X的指定范围内求y的平均值??
比如下面x范围是从-18.19959641到-18.00003052之内的 怎样求得-18.19959641到-18.18049049这个范围内后面Y的平均值?或者怎样求的其他范围内Y的平均值??
X Y
-18.19959641 5.9242
-18.1993618 -0.7096
-18.19741249 5.2766
-18.19721985 -1.5395
-18.195158 -0.1051
-18.19511414 0
-18.19479752 -3.0457
-18.1941433 -0.0035
-18.1930294 10.3146
-18.19298172 -0.0144
-18.19259262 -0.1208
-18.19239807 -0.1276
-18.19078255 -2.0534
-18.19075775 -0.0025
-18.1902771 -1.0513
-18.19013023 7.0636
-18.18982124 -0.0011
-18.18920708 16.302
-18.18919945 0
-18.18857574 -0.0005
-18.18854904 -3.0415
-18.1882019 2.1244
-18.1881752 -0.0143
-18.18793488 15.4666
-18.18776131 5.6506
-18.18761635 8.6408
-18.18743515 19.7355
-18.18704224 8.8569
-18.18687248 19.6015
-18.18655205 -0.8017
-18.18622017 -0.7607
-18.18577766 -3.2064
-18.18564796 23.185
-18.18562889 3.3601
-18.18531418 7.0253
-18.18519783 10.3943
-18.18518639 -0.1314
-18.18512535 -0.0001
-18.18457413 -1.3614
-18.18396378 -0.0005
-18.18391991 5.5864
-18.18388557 33.3147
-18.18313789 -0.0733
-18.18312645 1.8809
-18.18264198 -1.1592
-18.18202591 8.0298
-18.18195534 1.7312
-18.18161964 -0.001
-18.18092155 -0.0023
-18.18061256 -0.0365
-18.18049049 0.9657
-18.17967224 -0.1123
-18.17948914 -0.0001
-18.17916298 0
-18.17824554 3.3007
-18.17806435 3.6327
-18.17774963 -2.1692
-18.17726517 -0.0073
-18.17667007 1.0417
-18.17653465 -0.2322
-18.17593002 -2.0123
-18.17435265 5.1871
-18.17364311 14.7583
-18.1733036 -0.0284
-18.17164612 3.4666
-18.17065811 7.3549
-18.17063904 -0.0038
-18.17012978 -0.002
-18.16938591 4.8306
-18.16773987 -3.4505
-18.16651726 0
-18.1660862 44.6085
-18.16601372 25.0922
-18.16595078 -0.063
-18.16587257 0
-18.16532326 -0.1338
-18.16464615 -0.6812
-18.16413498 -1.7376
-18.16396713 6.075
-18.1