0

I want to find the sum of this vector:

 [1]  -10.7173913   -0.7173913  -11.7173913  -49.7173913   10.2826087  -49.7173913   78.2826087  -84.7173913
 [9] -109.7173913  -89.7173913  -28.7173913  -14.7173913 -118.7173913   49.2826087  -76.7173913  -65.7173913
[17]  -94.7173913  108.2826087  -45.7173913  -39.7173913 -133.7173913   49.2826087   26.2826087  -24.7173913
[25]    2.2826087   69.2826087  -52.7173913   25.2826087   81.2826087  -53.7173913  117.2826087  151.2826087
[33]   15.2826087  -40.7173913   70.2826087   40.2826087   85.2826087  -10.7173913   59.2826087  -10.7173913
[41]  -12.7173913   21.2826087    0.2826087   93.2826087   23.2826087   54.2826087

The sum of this vector is 5.684342e-13 in R studio. This was the value I got after using the sum function. It should be 0 as it is a vector that has had the mean subtracted from each value. Out of curiosity I downloaded it as a csv, tried finding the sum in a spreadsheet, and got 0 as I expected. I feel like I'm not seeing something completely obvious, but I just don't see it.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291

0 Answers0