R script line numbers at error?

后端 未结 6 1763
迷失自我
迷失自我 2020-11-28 21:12

If I am running a long R script from the command line (R --slave script.R), how can I get it to give line numbers at errors?

I don\'t want to add debug commands to

6条回答
  •  执笔经年
    2020-11-28 21:53

    You do it by setting

    options(show.error.locations = TRUE)
    

    I just wonder why this setting is not a default in R? It should be, as it is in every other language.

提交回复
热议问题