I retire a climbing rope after two years and any haul line, cleaning rope, whatever, after four. This is no magic number, it is just what I feel comfortable with.
I suppose ropes fail occasionally, but that danger is considerably smaller than others you face while climbing. Nonetheless, I know that I don't want thoughts of rope failure on my mind, so I change out ropes pretty frequently.
I have also retired a rope just because it was looking frayed after only a few uses. I know that is was only superficial and didn't affect the core or the overall integrity of the rope in a substantial way, but it gave me the willies and distracted me. It was a Beal, and I will not buy another one--even though other folks have had Beals and liked them just fine.
that's my thoughts on that even though I have nothing scientific to back it up with.