HenrikBengtsson / startup

:wrench: R package: startup - Friendly R Startup Configuration
https://henrikbengtsson.github.io/startup/
163 stars 5 forks source link

startup: on_next_startup(expr, at = 0L) #73

Open HenrikBengtsson opened 5 years ago

HenrikBengtsson commented 5 years ago

Add mechanism to evaluate R code next time a new R session is launched. When completed, wipe.

This can be useful when restarting RStudio session. For instance, we might even be able emulate --vanilla in RStudio this way.

This most likely has to be orchestrated via the filesystem.

HenrikBengtsson commented 4 years ago

There could be an option to control whether the next R/Rscript process should pick this up, or only one of the same "kind" as the current one. This could be conditioned on current commandArgs() and the current working directory. Speaking of the latter, we could restrict it to pick up a ./.startup,process-then-destroy.Rprofile file.