I am wondering if there could be a setting that I skip to get R
return NaN
instead of Β± Inf
when dividing by zero.
Too often I find myself doing something like
results[is.infinite(results)] <- NaN
I hope to skip the filtering / search process in general.
Example:
#
A simple way to achieve the desired results:
quotient[is.infinite(quotient)] <- NaN
I am wondering if this last step can be avoided while still getting the same desired results.
source share