debugging littler/Rscripts

后端 未结 3 1687
自闭症患者
自闭症患者 2021-02-09 08:08

How do I debug Rscripts that are run from the command line?

I am currently using the getopt package to pass command line options, nut when the

3条回答
  •  悲&欢浪女
    2021-02-09 08:36

    I either use old-school print statements, or interactive analysis. For that, I first save state using save(), and then load that into an interactive session (for which I use Emacs/ESS). That allows for interactive work using the script code on a line-by-line basis.

    But I often write/test/debug the code in interactive mode first before I deploy in a littler script.

提交回复
热议问题