Sometimes it can be hard to figure out which step in a set of R commands generated a warning. When testing one's code, you can invoke options(warn=2) to ensure that R will stop immediately upon issuing a warning.
Last modified 12/13/08.