I am trying to debug a function. I would like to display warnings when they occur but I don't understand how to change the warning settings.
Go to Settings and tap Notifications. Select an app under Notification Style. Under Alerts, choose the alert style that you want. If you turn on Allow Notifications, choose when you want the notifications delivered — immediately or in the scheduled notification summary.
It may be useful to specify
options(warn=2, error=recover)
As mentioned by @plannapus, warn=2
will upgrade warnings to errors; error=recover
will drop you into a debug/browser mode at the point where the warning (now upgraded to an error) occurred. (Use options(warn=0, error=NULL)
to restore the original settings.)
Set
options(warn=1)
Read more in ?options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With