标签: r
这是我的编程...
rowmean<-function(x,narm=TRUE){ nr<-nrow(x) means<-numeric(nr) for(i in 1:nr){ means[i]<-mean(x[i,],na.rm=narm) } means } rowmean(airquality,TRUE)
NA不会从我的答案中删除吗?