I'm using julia-0.7. The following code
using Statistics
x=[missing, 0]
mean(skipmissing(x))
gives 0 where missing is the built-in missing value of julia-0.7. If I further try
x[2]=missing
mean(skipmissing(x))
I get error message. What is the best way to get missing instead of error in the second case?
I'm afraid of using if/else because this snippet is iterated many times in the program.