I am trying to add an option to an R Profile file so that when R is started the option is set automatically. In particular, I'm trying to change a blogdown option (through using options(blogdown.subdir = 'blog')).
I followed the steps in Section 1.4 of @yihui's blogdown book to edit the file:
file.edit("~/.Rprofile")
When I restart my R session and / or close and reopen R Studio, the R Profile file remains changed, but the option does not appear to have unless I run the options() line in the console. I then tried adding a few other things to my R Profile (i.e., message("Hello!") to test whether the file was run, but was curious if there is a more reliable or better way to check that the file is being run.
One idea: you could set a variable to the global environment in your .Rprofile script, then check for that variable's existence. (Or if you don't want to touch the global environment, you could set a value using options() and again check for existence.)