I think the E-wing had the most sensible spot for the astromech: inside the cockpit with all the stuff he needs to fix protected and not making a beautiful target for some gun-happy Imp.
Yeah, I don't understand why the N-1 doesn't just retract the R2 head, and leave it in the hull. There's no reason for the R2 unit to stick out like that.