Help with combining 2 sketches together.

if this is not met

incomingByte = Serial.read();
    if (incomingByte == 'R')

Then I want it to skip everything after it. Is that what you are sking Mike?