The R-band Hubble diagram for gigahertz peaked spectrum radio galaxies