Attenuation of the x rays and gamma rays in the Ti-22, Nb-41, Tm-69, Yb-70, and Lu-71 elements have been measured with special emphasis for the x ray energies (E-in) in lower vicinity of the K shell ionization threshold (B-K) of the element. The incident photon beam is obtained from decay of the Fe-55, Am-241, and Co-57 radioisotopes, and fluorescence of the V-23, Yb-70, Lu-71, W-74, Os-76, and Th-90 targets excited by the x rays and gamma rays from the radioisotopes. The measurements were performed using energy dispersive setups involving Ge detectors. The measured attenuation coefficients agree with the available theoretical values except at the photon energies with (B-K-E-in) less than or nearly equal to the K-shell width (Gamma(K)), where significant positive deviations as large as factor of 2 have been observed. In view of reliability of the available theoretical cross sections for the photoionization and the photon scattering processes, the magnitude of positive alteration at the photon energy in lower vicinity of the ionization threshold is attributed to the K shell resonant Raman scattering (RRS) process and the corresponding cross sections have been deduced. Possible matrix effects in the energy dispersive x ray spectrometry due to RRS are also discussed.