【发布时间】:2014-09-04 15:06:51
【问题描述】:
我很难理解为什么会发生这种情况:
a<-c(1.1,1.2,1.3)
b<-c(2.1,2.3,2.6)
c<-c(1.6,2.3,2.6)
mean<-rowMeans(matrix(c(a,b,c),ncol=3))
mean #### This are the mean values
[1] 1.600000 1.933333 2.166667
mean(a[1],b[1],c[1]) #### trying to calculate the mean of 1.1 ,2.1 and 1.6
[1] 1.1 #### Why is this not 1.6??
【问题讨论】: