It is not possible to evaluate an R expression from the CLI prior to the first R prompt. For example, the following will evaluate the R expression, but then terminate R:
$ R --quiet -e 'message("hello")'
> message("hello")
hello
>
>
Idea
With startup::startup() in ~/.Rprofile, we could support something like:
To be decided: Should this be evaluated at the beginning or the end of the startup process? By doing it at the end, the expression can rely on user's custom setup to be in place.
Background
It is not possible to evaluate an R expression from the CLI prior to the first R prompt. For example, the following will evaluate the R expression, but then terminate R:
Idea
With
startup::startup()
in~/.Rprofile
, we could support something like:To be decided: Should this be evaluated at the beginning or the end of the startup process? By doing it at the end, the expression can rely on user's custom setup to be in place.