[Rd] Tips for debugging: R CMD check examples

Spencer Graves spencer.graves at structuremonitoring.com
Wed Jun 30 15:29:58 CEST 2010

Hi, Hadley:

       1.  Is your memory clear when you run the examples successfully?  
I.e., start with "rm(list=objects())", then try the examples that work 
interactively but fail in "R CMD check".

       2.  Also, does "R CMD check" give any warnings, e.g., undefined 
global, in addition to the error message?  If yes, fixing those might 
also fix the error message.

       The suggestions of Deepayan and Sarker are excellent, but the two 
things I suggests are more targeted and might work, so I'd try them first.

       Hope this helps.

On 6/30/2010 1:05 AM, Deepayan Sarkar wrote:
> On Wed, Jun 30, 2010 at 3:26 AM, Hadley Wickham<hadley at rice.edu>  wrote:
>> Hi all,
>> 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.
> 'R CMD check pkg' will produce a pkg.Rcheck/pkg-Ex.R file that
> collects the examples into a single file (and also does other things).
> You could try running that file interactively to see if the error is
> reproduced.
> -Deepayan
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567

More information about the R-devel mailing list