I tried using the clipping function to get average malnutrition values rather than total populations and got some NaNs back.
Dejan already included a way of passing in a custom summary function to the clipping method so I can get apply mean() rather than sum(), but average of an empty set isn't defined and in those cases what I'd actually like is something like nearest value