Apologies if this has been already answered elsewhere. Is there a way to define RStudio's theme in a R project file? It's a minor thing, but I frequently work on different computers and every time I open a project I have to re-define the editor's theme manually. Was wondering whether there is a way to automatically take care of it. I could imagine that if falls outside of the scope of what project files are originally meant for.
Unfortunately Rprofile.site or .Rprofile won't work because the code executed there is executed outside of the RStudio context. The rstudioapi::applyTheme() function allows you to programmatically change the RStudio theme, but again, it will not run from .Rprofile. More discussion can be found in this issue.