From tobias.verbeke at openanalytics.eu  Wed Jun 30 09:34:00 2010
From: tobias.verbeke at openanalytics.eu (Tobias Verbeke)
Date: Wed, 30 Jun 2010 09:34:00 +0200
Subject: [Rd] Tips for debugging: R CMD check examples
In-Reply-To: <AANLkTilQ9vYlaqXLQTeFjVfvzuQRsZ1uEX5x9_3EtI5D@mail.gmail.com>
References: <AANLkTilQ9vYlaqXLQTeFjVfvzuQRsZ1uEX5x9_3EtI5D@mail.gmail.com>
Message-ID: <4C2AF368.8090803@openanalytics.eu>

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



[Rd] Tips for debugging: R CMD check examples
Tobias Verbeke