Skip to content

Error: argument is of length zero

2 messages · Derek Lacoursiere, jim holtman

#
Hi,

I have the following:

	for(j in (y.raw+1):(rownum-1)){
		valsum<-tstfframed[min.x,j]+tstfframed[min.x,j+1]
		if(valsum == 1){
			cat("valsum loop")
			int.num<-int.num+1
		}
		
	}

but I get the error message: "Error in if (valsum == 1) { : argument is of length zero".  I checked whether to see if all the stated variables have associated values (and are not NAs) and every variable (even valsum!) has a value.  I have no idea where my error is. Can you help me?