subin function

Substitute new values into the input object