R Warning in min & max – no non-missing arguments returning Inf (2 Examples)
In this R tutorial you’ll learn how to handle the warning message in min & max – “no non-missing arguments; returning Inf”.
Example 1: Replicating the Warning in min & max : no non-missing arguments; returning Inf
min(integer(0)) # Empty input vector leads to warning # [1] Inf # Warning message: # In min(integer(0)) : no non-missing arguments to min; returning Inf |
min(integer(0)) # Empty input vector leads to warning # [1] Inf # Warning message: # In min(integer(0)) : no non-missing arguments to min; returning Inf
Example 2: Solving the Warning in min & max : no non-missing arguments; returning Inf
min(1:10) # Proper vector does not lead to warning # [1] 1 |
min(1:10) # Proper vector does not lead to warning # [1] 1
Further Resources & Related Articles
In addition, you might read the other articles of my homepage. I have published several tutorials already: