Updated 2015 January 14th to include a slide from Rafael.
In statistics, quantile normalization is a technique for making two distributions identical in statistical properties. To quantile normalize two or more distributions to each other, without a reference distribution, sort as before, then set to the average (usually, arithmetical mean) of the distributions. So the highest value in all cases becomes the mean of the highest values, the second highest value becomes the mean of the second highest values, and so on.
Here, I follow the simple example on Wikipedia using R. Firstly, let's create the test dataset: