Evidence for electron-lattice coupling in RNiO3 perovskites