0

I want to configure my .Rprofile in order to :

  • Apply the editor theme in RStudio to "Idle fingers"
  • Set default encoding for source files to "UTF-8"

I don't want to use RStudio menus to do this

What I tried :

library(rstudioapi)
rstudioapi::applyTheme("Idle Fingers")

I got this message Error : RStudio not running

Many thanks in advance !

user2554330
  • 37,248
  • 4
  • 43
  • 90
Damien Dotta
  • 771
  • 3
  • 13
  • Why is this necessary? RStudio preserves the theme across restarts. So just run your code once, and it will continue in the next session. – user2554330 Dec 10 '20 at 10:07
  • Because I am working on an RStudio server in which this type of configuration is not preserved between restarts of RStudio – Damien Dotta Dec 10 '20 at 10:34
  • I see. I don't know of any way to change this, but you could save some typing by making a package with a short name and have a function with a short name in it execute your code, e.g. `a::theme()` to run `rstudioapi::applyTheme("Idle Fingers")`. You don't need the `library(rstudioapi)` call. – user2554330 Dec 10 '20 at 10:59

0 Answers0