[ESS] run R code upon starting each ESS session

Tyler Smith ty|er @end|ng |rom p|@nt@rum@c@
Tue Oct 3 21:09:43 CEST 2023


On Tue, Oct 3, 2023, at 12:52 PM, Manuel Teodoro via ESS-help wrote:
> Is there a way to run R code upon starting each ESS session?
>

Hi Manuel,

ESS provides a hook you can use for this purpose. This is described in the manual: 

https://ess.r-project.org/Manual/ess.html#Customizing-startup

To run a custom script each time ESS starts, use something like the following:

    (add-hook 'ess-r-post-run-hook (lambda () (ess-load-file "foo.R")))

- ty



More information about the ESS-help mailing list