The invention provides a system for measuring respiratory rate (RR) from a patient. The system includes an impedance pneumography (IP) sensor, connected to at least two electrodes, and a processing system that receives and processes signals from the electrodes to measure an IP signal. A motion sensor (e.g. an accelerometer) measures at least one motion signal (e.g. an ACC waveform) describing movement of a portion of the patients body to which it is attached. The processing system receives the IP and motion signals, and processes them to determine, respectfully, frequency-domain IP and motion spectra. Both spectra are then collectively processed to remove motion components from the IP spectrum and determine RR. For example, during the processing, an algorithm determines motion frequency components from the frequency-domain motion spectrum, and then using a digital filter removes these, or parameters calculated therefrom, from the IP spectrum.