Tab width option not working in .Rmd files

Hi,
I've been trying to use the option to change the width of tabs to 4 spaces instead of 2, and it's not working in .Rmd files, though it works fine in .R files.

I previously had it in my settings, so as suggested on this page, I tried resetting my RStudio settings, but even after I reset my settings and set up tab width 4 spaces in the new settings, it isn't being applied in editing (I also restarted RStudio after setting up my new settings).

How can I get the requested tab with in .Rmd documents as well as .R documents?

Thanks