Ideal Gas Constant Wikipedia states that the ideal gas constant relates the energy scale to the temperature scale. It serves as the constant of proportionality. This is obvious from the units. If temperature is a measure of average kinetic energy, then why is the internal energy of an ideal gas, (which is just KE), $ \cfrac{3}{2} nRT $ and not just $ nRT $?
My first thought is that this constant was defined in terms of the ideal gas law, and that this relationship was determined before the KE of an ideal gas was known. Regardless, how can it be said that R is the constant of proportionality between the two units (K and J), when in fact it is off by a factor of 3/2?
 A: Lengthy post ahead! Look toward the end for a quick recap.

The relationship between energy and temperature is a little more complicated than what you sketched here.
Boltzmann Distribution
The atoms in a gas don't all have the same amount of energy. In fact, their energies greatly vary. It is true that temperature is the measure of the average energy of the atoms. But temperature can be more precisely defined in terms of how this energy is actually distributed.
There is a distribution of energy known as the Boltzmann-distribution. It says that there is a reverse exponential relationship between the energy of an atom (or whatever thing you are considering) and the chances of finding an atom with that energy. So the chance of finding an atom with an energy in an interval $dE$ arround $E$ equals:
$$P(E)dE=A\cdot e^{-\beta E}dE$$
Where $\beta$ is some positive factor of proportionality. $A$ is chosen such that the total chance of finding an atom at any energy is $1$.
We already know that $\beta$ will be a function of the temperature $T$. We know that a higher temperature means more energetic atoms. So the higher the temperature, the better the chances of finding an atom with high energy. This means that a high $T$, must mean a low $\beta$. A possible expression for $\beta$ would therefore be:
$$\beta=\frac{1}{k_BT}$$
Where $k_B$ is some positive factor of proportionality, known as Boltzmann's constant.
In fact, the above equation is the definition of temperature.
Now then, we have an equation relating energy and temperature, but its factor isn't $R$, it's $k_B$. What's going on here? Well, the above equations talk about the energy of a single atom, which isn't the kind of scale we usually talk about. Therefore, we have also defined a factor $R$, which talks about the energy of a mole of gas:
$$R=N_Ak_B$$
Where $N_A$ is the number of particles in a mole, known as Avogrado's constant.
But that still doesn't help us with the factor of $\frac{3}{2}$!
Equipartition of Energy
To explain this, let's do a little though experiment:
Imagine a cubic gas chamber. On one side of this gas chamber we have a very thin, but long, tube. The tube is so thin, that the gas atoms in this tube can only move forward and backward through the tube, not up and down or left and right. On the other hand, the gas atoms in the cubic part of the chamber can move in all three directions. The gas in the tube and in the chamber are in thermal contact. That means they have the same temperature. Now let's think about how both groups of atoms are behaving.
Let's imagine for a moment that the atoms in the cubic part of the chamber are doing their normal thing, all moving at different speeds, but with a well defined average temperature, in accordance with the Boltzmann-distribution. Now lets imagine that the atoms in the tube are sitting totally still. At some point, an atom from the cubic chamber will hit one of the atoms in the tube. Let's pretend the moving atom gives off exactly half its energy tot the idle atom. The idle atom probably wants to move in some diagonal direction, but it can only move forward and backward. While bouncing off of the tube's walls the atom will start to lose its velocity in the sideways and up- and downwards directions, and instead start to move forward and backward more quickly. Over time, the same happens to all of the other atoms in the tube. 
The atoms in the tube now all have the same energy as the atoms in the cubic chamber. But all this energy is 'channeled' into just one direction (let's say the x-direction), whereas the energy of the other atoms is distributed equally over all three directions. In other words, the x-velocity of the atoms in the tube, is much greater than the x-velocity of the atoms in the cubic chamber.
Now when an atom from the cubic chamber hits an atom from the tube, it will get a push in the x-direction. Because of this, the cube-atom gains some energy, and the tube-atom loses some. This will keep happening, until the x-velocity of the atoms is the same in both parts of the gas chamber. The entire system must eventually get to this state of equilibrium.
But now the energy isn't evenly distributed between the atoms! Instead the energy is evenly distributed among the different directions atoms can move along. We call these directions degrees of freedom. The atoms in the cubic chamber have three degrees of freedom, the atoms in the tube just one. The fact that energy is evenly distributed over different degrees of freedom is called the Equipartition Theorem. It is entirely possible to have more than three degrees of freedom. For example, complex molecules do not only move through the chamber, they also rotate and vibrate in all sorts of ways. These are all degrees of freedom, and energy will be distributed among them equally. But in the case of a mono-atomic gas, there are exactly three degrees of freedom, each getting their fair share of energy.
This explains the $3$ in $\frac{3}{2}$, but how about the $\frac{1}{2}$?
Average Energy
This half comes falling out when you apply all of this knowledge and calculate the integral to actually find the average energy. At this point, I'm not really willing to get into the algebra, but perhaps this is a more intuitive explanation:
To find the average energy $\langle E\rangle $, we add the energies in each of the degrees of freedom. So we split up the velocity $\mathscr{v}$ into its components $v_x$, $v_y$ and $v_z$.
$$\mathscr{v}=\sqrt{v_x^2+v_y^2+v_z^2}$$
$$\langle E\rangle =\langle \frac{1}{2}m\mathscr{v}^2\rangle =\langle \frac{1}{2}m(v_x^2+v_y^2+v_z^2)\rangle =\frac{1}{2}m(\langle v_x^2\rangle +\langle v_y^2\rangle +\langle v_z^2\rangle )$$
Now, because of the equipartition theorem we know that $\langle v_x^2\rangle =\langle v_y^2\rangle =\langle v_z^2\rangle $, let's call it $\langle v^2 \rangle$. So:
$$\langle E\rangle=\frac{3}{2}m\langle v^2 \rangle$$
Calculating $\langle v^2 \rangle$ is not so simple. But I think it now looks a lot more likely that this equation will come out to be $\frac{3}{2}k_BT$. If you then multiply by $N$ to get the total energy in the gas, you get:
$$U=N\langle E \rangle = N\cdot \frac{3}{2}k_b T = \frac{3}{2} nRT$$
Summary
To recap:


*

*Temperature is defined not in terms of the average energy, but the distribution of energy.

*Energy distributes equally between all degrees of freedom. A simple mono-atomic gas has three degrees of freedom. This gives rise to the factor $3$.

*The factor $\frac{1}{2}$ has to do with the translation of the energy distribution to the average energy. An intuitive way to think of this is to think of the factor $\frac{1}{2}$ in $\frac{1}{2}mv^2$.

A: You are right that the ideal gas constant $R$ first appears as a proportionality constant in ideal gas equation $PV=nRT$. Consider that, for ideal gas: $$PV=\cfrac{2}{3}N\bar{E}$$ where $N$ is number of particles and $\bar{E}$ is average kinetic energy of each particle (see here for derivation). The internal energy $U$, which is (as you said) just total kinetic energy, is just $$ U=N\bar{E}=\cfrac{3}{2}PV=\cfrac{3}{2}nRT$$
