transfer the integer back to ordered factor, for the neighbor method