# Best practice to deal with \`missing\` in packages

**URL:** https://discourse.julialang.org/t/best-practice-to-deal-with-missing-in-packages/14236
**Category:** General Usage
**Created:** [August 29, 2018, 11:04am UTC](https://discourse.julialang.org/t/best-practice-to-deal-with-missing-in-packages/14236 "2018-08-29T11:04:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [August 29, 2018, 11:04am UTC](https://discourse.julialang.org/t/best-practice-to-deal-with-missing-in-packages/14236/1 "2018-08-29T11:04:07Z")

</div>

A major part of the 0.7 transition is that now any (most) packages can have users passing in Arrays with `missing` in it, and we need to be able to deal with that somehow.  
Some functions in packages are calls to dependencies.  
My question is - what is the current best practice? To handle missings when they appear, and should appear (e.g. calls to `Statistics.mean`) with things like `skipmissing`, but pass them on to dependencies otherwise and expect them to handle them?  
And is there a guide for updating package code to handle `missing`s?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [August 29, 2018, 11:18am UTC](https://discourse.julialang.org/t/best-practice-to-deal-with-missing-in-packages/14236/2 "2018-08-29T11:18:07Z")

</div>

> [@mkborregaard](#):
>
> pass them on to dependencies otherwise and expect them to handle them?

If the dependencies are written in Julia, I would suggest this.

When applicable, the last interface between Julia and something else should handle the appropriate conversion. Eg in PGFPlotsX, we can do this in a [single line](https://github.com/KristofferC/PGFPlotsX.jl/blob/dc92689ae57b96acfb1fe10916cf7f543f9be1dc/src/PGFPlotsX.jl#L83).
