Missings.jl icon indicating copy to clipboard operation
Missings.jl copied to clipboard

Add a `notmissing` function.

Open pdeffebach opened this issue 6 years ago • 2 comments

With broadcasting, .!ismissing.(x) is awkward to write. It would be nice to have a function notmissing that would get around this.

pdeffebach avatar Feb 21 '19 23:02 pdeffebach

It looks a bit funny, but duplicating functions doesn't sound great...

nalimilan avatar Feb 22 '19 09:02 nalimilan

Also note that there are other ways you can write it depending on the end goal. A direct replacement would be map(!ismissing, x), but to index into a structure, filtering out missing values, you could get indices with findall(!ismissing, x), or use filter if an appropriate method exists for your structure.

ararslan avatar Feb 22 '19 18:02 ararslan