RR ties are made out of a wide variety of different species of trees, which is why there is such a huge variation in how long they last. A tie that is made out of white oak or western larch is going to last decades longer than one made out of tulip or ponderosa pine. The challenge is, it's difficult to tell what kind of wood you're getting when you're buying them unless you're able to cut into them to see the grain. Even then, you have to know what you're looking for. Best bet, for a person who can't cut into the ties and/or who isn't familiar with what the different types of wood look like is to try to find the heaviest ties in the stack. The heavier they are, the more likely it is that they're made of one of the more rot resistant species of wood. It's not a guarantee, especially if the ties are full of water, but it gives you a better chance.