[R] transition matrix and discretized data

I have data on earnings of 12000 individuals at two points in time. I intend to construct a transition matrix, where the typical element, p_ij, gives the probability that an individual ends at the j-th decile of the earnings distribution given that he was was initially at the i-th decile. Thus, this is a bi-stochastic matrix. The problem is that the income data is nearly discrete in the sense that many individuals hold the same income level at each point. For instance, there are 1400 individuals who earned in period-one the minimum positive income (say, $100). Therefore, in the first decile there will be more than 10% of the individuals. This happens for both periods, and for a few income levels. As a result, the transition matrix won't have both rows and columns summing to one.

The solution I've found for this problem was to generate a uniform random vector, with entries ranging from, say, -.0001 to .0001, and ad it to both earnings vectors and compute the transition matrix. Repeat the procedure 1000 times and get the mean of the resulting matrices. The thing is I'm totally new to simulations. Here's part of what I'm trying to do:

# X is a two-comun data frame. column 1 is the period-one individuals' earnings and column two is the period-two.