max, your conclusions are based on gas within a closed container.
In that model, the volume remains constant, as does the density. This is not true of the atmosphere, where pressure, density, volume and temperature all vary.
What remains constant is R.