[R] Executing an R script and show the plots.

Martin Møller Skarbiniks Pedersen tr@xp|@yer @end|ng |rom gm@||@com
Wed Jan 29 12:11:17 CET 2020


On Sun, 26 Jan 2020 at 16:30, Felix Blind <felixblind using gmail.com> wrote:
>

> But when I put the same code in a file script.r and run it with R -f
> script.r or if I source it in the REPL with source("script.r") I do not
> get any plots shown.
>
> Can you guys tell me what I do wrong. (Apart from either using RStudio
> or the REPL exclusively)

Add Sys.sleep(Inf) to the end of your script.r and run it with

R --interactive < script.r

It works for me.

Regards
Martin



More information about the R-help mailing list