Find the elements that sums closest to zero value

Welcome to community!

Would you mind converting your code into a reproducible example (reprex)?

I am a bit confused what you input is, what you want to do, what you hope to get as output. Currently your code delivers an error related to certain objects nothing having been set up (specifically, numbers).