Well, if the word begins with the letter r-, you have to write "a" (a reward, a run, a risk etc...). "An" is used before a word begining with a vowel (an end, an order...)/with a vowel sound (an hour).
If you're talking of the letter R, then it's an R, because when you pronounce the letter R, you begin with a vowel so