# Determining Gas Constant $R$ from Boyles Law?

I have done an experiment (Boyles Law experiment using Boyles Law Apparatus) in order to determine the value of the gas constant $$R$$. I have also taken into account the dead space volume in my calculations. I am just confused about how I came to my answer there are two ways.

My first method to determine the value of $$R$$ was by doing:

$$R = pVM/mT$$ where I worked out the Molar mass ($$M$$) of air which was 28.97 grams and I used an online converter (Volume to Weight of air) to determine the mass of air which came out to be 0.53 grams. I was told to look for a converter online by one of my lab practitioners to find known weights of air.

This gave my value of $$R$$ to be 7.70 which is not bad considering my uncertainties.

However, my second method of calculating $$R$$ was to do

$$pV = NkT$$ rearranging to $$N = pV/kT$$ which obviously means I'm using the Boltzmann constant. I then subbed my value of N into $$n = N/N_A$$ ($$N_A$$ being Avogadro's constant) and then finally I subbed moles ($$n$$) into $$pV = nRT$$ which then gave my value of $$R$$ to be 8.3106 which is great.

I feel like this result is too good and I might not have a full understanding of the Boltzmann constant or if I'm making unknown assumptions or if it's incorrect. I was hoping some could clarify my results for me as I'm not sure on what to write up.

Any help will be appreciated thank you.

I've never used the Boyles Law apparatus so I don't know if $$P$$ was measured too but for comparison of the 2 methods I'm assuming $$P$$ and $$T$$ were both constant.
I immediately see a potential problem with the first method using the value of $$28.97 g/mole$$ for the molar gas volume since this value is for dry air. It's not clear if you dried the air or actually know its composition.
I would expect the second method to be superior to the first method since it uses the measure volume and the well defined constants $$N$$ and $$k$$. It doesn't require knowing the composition of air.