Abstract Neutron spectroscopic experiments performed for the high-T c superconducting hole-doped RBa 2Cu 3O x (R=rare earth; 6≤x≤7) and electron-doped R 2-xCe xCuO 4-δ (0≤x≤0.2) compounds are discussed. In these systems the R ions are situated close to the superconducting CuO 2 planes, thus the crystal-field interaction at the R site constitutes an ideal local probe of the charge distribution and thereby monitors directly changes of the carrier concentration induced by doping. For several compounds the observed crystal-field spectra separate into different local components whose spectral weights distinctly depend on the doping level, i.e., there is clear experimental evidence for cluster formation. The onset of superconductivity can be shown to result from percolation, i.e., the superconductivity is an inhomogeneous property in the persovskite-type compounds. From a line-width analysis of the observed crystal-field transitions we derive the evolution of the fractal sizes of the clusters versus doping. At high doping the neutron spectroscopic data reveal anomalies which are interpreted in terms of copper-oxyde charge fluctuations.