r语言for循环报错

请问这个报错是什么意思呀,应该如何改正

for(i in 1:nrow(X)){
+   for(j in 1:ncol(X)-1){
+     m[1,j]<-dpois(as.numeric(X[1,j]),X[1,152])
+   }
+ }
Error in x[[jj]] : 
  attempt to select less than one element in get1index <real>



出错的意思是获取列表元素时试图获取x[[0]]或者x[[NULL]]而出错,在代码中排查是哪里导致列表索引为0的问题。