Running R Scripts with Plots

后端 未结 5 1329
情书的邮戳
情书的邮戳 2020-12-09 02:36

I have a small shell script (bash) which runs a R script which produces a plot as output. Everything works fine but immedietly after the plot is rendered R quits. Is there a

5条回答
  •  青春惊慌失措
    2020-12-09 03:15

    More important question is why do you want R to run after graph creation? Use it either in interactive mode or in batch mode... I don't understand what do you want to accomplish. Besides, try littler, it's located in Ubuntu repos (universe repos, if I'm correct), or Rscript, so rewrite your script and name it myscript.r, and be sure to put correct path in the first line. Try whereis Rscript (usually /usr/bin/Rscript). Forget about bash script. You can pass --vanilla and --slave arguments to Rscript, but I don't see the purpose... O_o

提交回复
热议问题