Tuning the charge density wave and superconductivity in 6R-TaS2−xSex