Knowing nothing about the subject, here is something that I don't quite get about the definition as it appears here... You gave an example of a [5,2] hamming code, where each 2-bit word is encoded as a 5-bit word. This makes perfect sense, but what is the purpose of r? If k=n-r, then r is 3 in this example, but it also says that n=2^r-1 which is not true (2^3-1=7). Perhaps we need a more detailed definition.
Also, again this is just a curiosity, but there is nothing magical about these codes, all it does is repeat the 2-bit word twice, so that if any one bit is missing the other occurrence of the word is intact. The fifth bit is arbitrary.
00 = 00 00 0
01 = 01 01 1
10 = 10 10 1
11 = 11 11 0