invert_named function

Invert a named vector