Skip to content
Back to formatted view

Raw Message

Message-ID: <4C2AF368.8090803@openanalytics.eu>
Date: 2010-06-30T07:34:00Z
From: Tobias Verbeke
Subject: Tips for debugging: R CMD check examples
In-Reply-To: <AANLkTilQ9vYlaqXLQTeFjVfvzuQRsZ1uEX5x9_3EtI5D@mail.gmail.com>

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