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日) - “一根蜡烛”
任何想法,为什么?以及我如何解决这个问题?