I have my tab width set to 4. However, RStudio appears to keep resetting the tab width to 2 spaces, although the setting itself remains at 4. The only way to fix it temporarily is to change the tab width to something else, like 6, click OK, then change it back to 4 again. However, the next time I open RStudio the tab width is back to 2. This is driving me nuts. This started happening with RStudio 1.2.
I do remember changing the tab width to 2 spaces a long time ago, but then changing it back to 4. Not sure if there's some config file somewhere that's still referring to that?
My version of RStudio: Version 1.2.1335, Build 1379 (f1ac3452)
If RStudio is unable to read / write that file for some reason, then it will default back to using 2 spaces for the tab width. Could that be what's happening in your case?