The $R$ in that equation is the distance to the center of the massive object. For the Earth:
$$ \frac{2GM_\mathrm{Earth}}{c^2} \approx 9\,\mathrm{mm}, $$
and for the Sun:
$$\frac{2GM_\mathrm{Sun}}{c^2} \approx 3\,\mathrm{km}. $$
As @ACuriousMind implies in a comment, that equation only works outside of a massive object. For any real object you would be well inside before hitting the $R = 2Gm/c^2$ mark.
It might help to see what's going on, if you know where that equation came from. That expression for gravitational time dilation comes from the Schwarzschild solution to Einstein's field equations from General Relativity.
The Schwarzschild metric tell us about the space-time in a vacuum near a stationary, spherically symmetric mass. That it's a vacuum solution is why whether you are inside or outside the massive object matters. If you are 1 km from the center of the Sun you are not in a vacuum, so you need a different mathematical description of what's going on.