switch x and y if both numeric in summary and inference functinos