R – argument is of length zero in if statement
“argument is of length zero” is a very specific problem that comes from one of my least-liked elements of R. Let me demonstrate the problem: As you can see, comparisons to a NULL not only don’t produce a boolean value, they don’t produce a value at all – and control flows tend to expect that … Read more