1
我正在做一個簡單的行總和和兩列給我0(這是它應該給出的數字),但最後一個給出了一個epsilon,但不是零SE。總和行不完全是零,當它應該
# generate the row values that their sumation should give zero.
d<-0.8
c<-1-d
a<-0.5
b<-0.5
e<-0.2
f<-1-e
Perc<-c(-1, a,b,c,-1,d,e,f,-1)
# Put them in a 3x3 matrix
div<-matrix(ncol = 3, byrow = TRUE,Perc)
# Do the row sum
rowSums(div)
# RESULT
[1] 0.000000e+00 0.000000e+00 5.551115e-17
rowSums(div)[3]==0
[1] FALSE
我使用這個R版本:版本3.4.1(2017年6月30日) - 「一根蠟燭」
任何想法,爲什麼?以及我如何解決這個問題?