From spencer.graves at structuremonitoring.com  Wed Jun 30 15:29:58 2010
From: spencer.graves at structuremonitoring.com (Spencer Graves)
Date: Wed, 30 Jun 2010 06:29:58 -0700
Subject: [Rd] Tips for debugging: R CMD check examples
In-Reply-To: <AANLkTimtoYO3ADZJkLZQ4YxEho8ucWQ9wwZI_7b77B9T@mail.gmail.com>
References: <AANLkTilQ9vYlaqXLQTeFjVfvzuQRsZ1uEX5x9_3EtI5D@mail.gmail.com>
	<AANLkTimtoYO3ADZJkLZQ4YxEho8ucWQ9wwZI_7b77B9T@mail.gmail.com>
Message-ID: <4C2B46D6.9070107@structuremonitoring.com>

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.
       Spencer


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



[Rd] Tips for debugging: R CMD check examples
Spencer Graves