使用rangemodelR包计算中域效应MDE,但是无论是用自己的数据还是包中自带的例子都会出现以下报错:
> tempmat <- matrix(0,nrow=10,ncol=200,dimnames=list(letters[1:10],1:200))
> tempmat <- as.matrix(apply(tempmat,2,function(x){rbinom(nrow(tempmat),1,
+ runif(1,0.1,1))}))
> rownames(tempmat) <- letters[1:10]
> temp <- rangemod1d(tempmat,nb = NULL,var = NULL,rsize = "observed",reps = 5)
Error in if (is.na(nb)) { : the condition has length > 1
求解,刚刚接触R,搞不懂是什么问题……