# What is the Julia equivalent of R's na.omit()?

**URL:** <https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-rs-na-omit/118546>\
**Category:** New to Julia\
**Created:** [August 24, 2024, 1:57am UTC](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-rs-na-omit/118546 "2024-08-24T01:57:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Susan.Thomas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/susan.thomas/32/51904_2.png) [@Susan.Thomas](https://discourse.julialang.org/u/Susan.Thomas)\
**Post date:** [August 24, 2024, 1:57am UTC](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-rs-na-omit/118546/1 "2024-08-24T01:57:01Z")

</div>

An a’b operation to get the dot product of two vectors returns `missing' if either (or both) vector has `missing’ elements. There doesn’t seem to be a simple way to join a and b, do the equivalent of an na.omit() on the structure and then do the dot product operation on the remaining vectors. What am I `missing’?

---

<div class="post-metadata">

**Author:** ![ElOceanografo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eloceanografo/32/624_2.png) [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Post date:** [August 24, 2024, 2:17am UTC](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-rs-na-omit/118546/2 "2024-08-24T02:17:19Z")

</div>

Welcome to the forum @Susan.Thomas! The `skipmissing` function is generally what you want to use when summarizing or reducing over a vector with missing elements. In this case, you could do:

`sum(skipmissing(a .* b))`

---

<div class="post-metadata">

**Author:** ![Susan.Thomas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/susan.thomas/32/51904_2.png) [@Susan.Thomas](https://discourse.julialang.org/u/Susan.Thomas)\
**Post date:** [August 24, 2024, 2:47am UTC](https://discourse.julialang.org/t/what-is-the-julia-equivalent-of-rs-na-omit/118546/3 "2024-08-24T02:47:45Z")

</div>

That worked. Thanks much. Will explore skipmissing() further.
