Ken,
There is no doubt that the 1901 census entry is the correct William DYER, there are several other people in the barracks who served in the East Yorkshire Regt. Frederick ORCHARD from Bath and Herbert MENDHAM from Norfolk, to mention just two of them, their record are also on FindMyPast. Further investigation would probably prove that some or the other soldiers were from various other Regiments.
Jebber