R - argument is of length zero in if statement

后端 未结 6 1753
别那么骄傲
别那么骄傲 2020-11-28 07:39

I am having a little problem with R and I am not sure why. It is telling me that this line: if(temp > data[[k]][[k2]]) { is of argument length 0. Here is the

6条回答
  •  余生分开走
    2020-11-28 07:56

    The argument is of length zero takes places when you get an output as an integer of length 0 and not a NULL output.i.e., integer(0).

    You can further verify my point by finding the class of your output- >class(output) "integer"

提交回复
热议问题