Purpose
While working on pair wise comparisons, I came across Tukey Stats. well , what are they ? They are studentized t tests.

Tukey’s test is based on a formula very similar to that of the t-test. In fact, Tukey’s test is essentially a t-test, except that it corrects for experiment-wise error rate (when there are multiple comparisons being made, the probability of making a type I error increases Tukey’s test corrects for that, and is thus more suitable for multiple comparisons than doing a number of t-tests )

If X1,…, Xn are independent identically distributed random variables that are normally distributed, the probability distribution of their studentized range is what is usually called the studentized range distribution. This probability distribution is the same regardless of the expected value and standard deviation of the normal distribution from which the sample is drawn.

They are generally used in testing pair wise comparisons

generate 100 normal variable

A nice question relating this would be :
If i take a normal random sample , lets say a sample size of 20 , find its range and divide by sd of the sample .repeat this stuff a million times, whats the distribution that you will land up with ?

Its the studentized range distribution. ptukey and qtukey can be used to get the values associated with it.

> ptukey(0:10, 2, df = 5)
 [1] 0.0000000 0.4889159 0.7835628 0.9126407 0.9632574 0.9833586 0.9918510
 [8] 0.9957141 0.9976011 0.9985838 0.9991249
> qtukey(0.95, 2, df = 2:11)
 [1] 6.079637 4.500659 3.926503 3.635351 3.460456 3.344084 3.261182 3.199173
 [9] 3.151064 3.112663

TukeyHSD is used in the context of anova to give bands