Another way of looking at it, is that the 'gas constant' is Boltzman's constant, k, from statistical mechanics, times Avagadro's number. R = k * Na. (Physicists like to count by single things, chemists like to count by moles.)
How the value of k is determined, I leave as an exercise for the reader.