[英]How to use knitr from command line with Rscript and command line argument?
[英]How to use R's `browser()` function from command line when using `Rscript`
如何從命令行運行帶有browser()
的腳本,以使其停止執行?
Rscript file.R
對我不起作用。 看來我只能使用R
的解釋browser()
。 我究竟做錯了什么?
R函數(例如browser()
, debugger()
或recover()
只能交互工作。
如果您的腳本沒有命令行參數,一個簡單的解決方法是啟動R和source("myscript.R")
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.