Hi Letter, This should do it: testchange <- ifelse(testseq <= 4,'x', ifelse(testseq >= 5, 'y', testseq)) Read it as: if testseq <=4, print x, ifelse test seq >=5, print y, any other case, print testseq. [[alternative HTML version deleted]]