问题
Is there a way to make Rstudio tell you which line of which sourcefile generated a warning message? Right now it just prints the message and I am lost as to what is causing the issue.
In Rstudio, this menu option is checked: Debug > Error > Error Inspector
But it doesnt' help, probably because these are warnings and not errors? Ideas?
回答1:
First turn on displaying warnings using the command
options(warn=1)
Then, you could run it by clicking on the "Source" or "Source with Echo" button (see image below). You can see the error/warning messages when any line with errors/warnings is executed.

来源:https://stackoverflow.com/questions/29132110/r-debugging-cannot-see-which-line-generates-warning-message-shiny