Apparently you can change the way R handles warnings with the “warn” option, which is quite handy for debugging.
It can have the following values:
< 0 : warnings are ignored
0 : warnings are stored and printed after top-level function has completed
1 : warnings are printed as they occur
2 : warnings are turned into errors
To get and set the value: