Tips for debugging: R CMD check examples
On 06/29/2010 11:56 PM, Hadley Wickham wrote:
Does anyone have any suggestions for debugging the execution of examples by R CMD check? The examples work fine when I run them from a live R prompt, but I get errors when they are run by R CMD check.
Not a real tip, but when it occurs I immediately check for namespace issues (which often turn out to be the origin). Things I do are - verify all packages involved have namespaces; - load all packages (i.e. put explicitly on the search path) to detect masking issues; - check all imports and exports and if relevant turn package imports into individual function imports to have a more fine-grained view. Agreed this is a very indirect way, but at times faster than trying to interpret the error message. Best, Tobias